rocketmq中consume_passively的含义 在RocketMQ中,consume_passively表示消息消费者以被动方式消费消息。具体来说,它指的是消费者不主动拉取消息,而是等待消息队列的推动。当有新的消息到达时,消息队列会立即将消息推送给消费者进行消费。 相对于主动拉取方式,被动消费方式可以降低消息消费者的资源占用,因为消费者不需要...
privatevoiduploadFilterClassSource(){Iterator<Entry<String,MQConsumerInner>>it=this.consumerTable.entrySet().iterator();while(it.hasNext()){Entry<String,MQConsumerInner>next=it.next();MQConsumerInnerconsumer=next.getValue();if(ConsumeType.CONSUME_PASSIVELY==consumer.consumeType()){Set<SubscriptionData...
consumeMessageContext.setMq(messageQueue); consumeMessageContext.setMsgList(msgs); consumeMessageContext.setSuccess(false); // init the consume context type consumeMessageContext.setProps(new HashMap<String, String>()); ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.executeHookBefore(consumeMes...
if (ConsumeType.CONSUME_PASSIVELY == consumer.consumeType()) { Set<SubscriptionData> subscriptions = consumer.subscriptions(); for (SubscriptionData sub : subscriptions) { if (sub.isClassFilterMode() && sub.getFilterClassSource() != null) { final String consumerGroup = consumer.groupName(); ...
{}",this.groupName,sub.toString());}}elseif(sub.getSubVersion() >old.getSubVersion()) {if(this.consumeType ==ConsumeType.CONSUME_PASSIVELY) {log.info("subscription changed, group: {} OLD: {} NEW: {}",this.groupName,old.toString(),sub.toString());}this.subscriptionTable.put(sub.get...
private void uploadFilterClassSource {Iterator<Entry<String, MQConsumerInner>> it = this.consumerTable.entrySet.iterator;while(it.hasNext) {Entry<String, MQConsumerInner>next= it.next;MQConsumerInner consumer = next.getValue;if(ConsumeType.CONSUME_PASSIVELY == consumer.consumeType) {Set<SubionData...
}elseif(pq.isPullExpired()) {switch(this.consumeType()) {caseCONSUME_ACTIVELY:break;caseCONSUME_PASSIVELY: pq.setDropped(true);if(this.removeUnnecessaryMessageQueue(mq, pq)) { it.remove(); changed =true; log.error("[BUG]doRebalance, {}, remove unnecessary mq, {}, because pull is pause...
privatevoiduploadFilterClassSource(){Iterator<Entry<String,MQConsumerInner>>it=this.consumerTable.entrySet().iterator();while(it.hasNext()){Entry<String,MQConsumerInner>next=it.next();MQConsumerInnerconsumer=next.getValue();if(ConsumeType.CONSUME_PASSIVELY==consumer.consumeType()){Set<SubscriptionData...
switch (this.consumeType()) { case CONSUME_ACTIVELY: break; case CONSUME_PASSIVELY: pq.setDropped(true); if (this.removeUnnecessaryMessageQueue(mq, pq)) { it.remove(); changed = true; log.error("[BUG]doRebalance, {}, remove unnecessary mq, {}, because pull is pause, so try to fixed...
case CONSUME_ACTIVELY: break; case CONSUME_PASSIVELY: pq.setDropped(true); if (this.removeUnnecessaryMessageQueue(mq, pq)) { it.remove(); changed = true; log.error("[BUG]doRebalance, {}, remove unnecessary mq, {}, because pull is pause, so try to fixed it", ...