Skip to content

Commit

Permalink
[ISSUE #2253]⚡️Change ConsumerManager signature of new method
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm committed Jan 15, 2025
1 parent 681f0a8 commit ee3338d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rocketmq-broker/src/client/manager/consumer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ pub struct ConsumerManager {
consumer_table: Arc<RwLock<HashMap<CheetahString, ConsumerGroupInfo>>>,
consumer_compensation_table: Arc<RwLock<HashMap<CheetahString, ConsumerGroupInfo>>>,
consumer_ids_change_listener_list:
Vec<Box<dyn ConsumerIdsChangeListener + Send + Sync + 'static>>,
Vec<Arc<Box<dyn ConsumerIdsChangeListener + Send + Sync + 'static>>>,
broker_stats_manager: Arc<RwLock<Option<Weak<BrokerStatsManager>>>>,
channel_expired_timeout: u64,
subscription_expired_timeout: u64,
}

impl ConsumerManager {
pub fn new(
consumer_ids_change_listener: Box<dyn ConsumerIdsChangeListener + Send + Sync + 'static>,
consumer_ids_change_listener: Arc<
Box<dyn ConsumerIdsChangeListener + Send + Sync + 'static>,
>,
expired_timeout: u64,
) -> Self {
let consumer_ids_change_listener_list = vec![consumer_ids_change_listener];
Expand All @@ -61,7 +63,9 @@ impl ConsumerManager {
}

pub fn new_with_broker_stats(
consumer_ids_change_listener: Box<dyn ConsumerIdsChangeListener + Send + Sync + 'static>,
consumer_ids_change_listener: Arc<
Box<dyn ConsumerIdsChangeListener + Send + Sync + 'static>,
>,
broker_config: Arc<BrokerConfig>,
) -> Self {
let consumer_ids_change_listener_list = vec![consumer_ids_change_listener];
Expand Down

0 comments on commit ee3338d

Please # to comment.