Skip to content

Commit

Permalink
rocketmq禁消费集成测试脚本test-20
Browse files Browse the repository at this point in the history
Signed-off-by: daizhenyu <[email protected]>
  • Loading branch information
daizhenyu committed Jan 12, 2024
1 parent ceeedf2 commit 13e212f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,18 @@ private void processDeleteEvent(DynamicConfigEvent event) {

private void executeProhibition() {
// KafkaConsumer标记配置已更新
System.out.println("开始禁消费");
LOGGER.info("kafka开始禁消费");
KafkaConsumerController.getKafkaConsumerCache().values()
.forEach(obj -> obj.getIsConfigChanged().set(true));
LOGGER.info("rocketmqpush开始禁消费");
RocketMqConsumerCache.PUSH_CONSUMERS_CACHE.entrySet()
.forEach(obj -> RocketMqPushConsumerController.disablePushConsumption(obj.getValue(),
ProhibitionConfigManager.getRocketMqProhibitionTopics()));
LOGGER.info("rocketmqpull开始禁消费");
RocketMqConsumerCache.PULL_CONSUMERS_CACHE.entrySet()
.forEach(obj -> RocketMqPullConsumerController.disablePullConsumption(obj.getValue(),
ProhibitionConfigManager.getRocketMqProhibitionTopics()));
System.out.println("开始禁消费");
System.out.println("结束禁消费");
}

/**
Expand Down

0 comments on commit 13e212f

Please sign in to comment.