You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/08/31 03:26:45 UTC

[GitHub] baigod opened a new issue #438: 广播消费时消费点位问题

baigod opened a new issue #438: 广播消费时消费点位问题
URL: https://github.com/apache/rocketmq/issues/438
 
 
   问题: 我创建了一个消费监听,代码如下
   
   
   ```java
   // 创建消费实例
   	@Bean(initMethod = "start", destroyMethod = "shutdown")
   	public DefaultMQPushConsumer rocketMQUserCudConsumer() throws MQClientException {
   		DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(rocketMQProperties.getConsumerId());
   		consumer.setNamesrvAddr(rocketMQProperties.getNamesrv());
   		consumer.setMessageModel(MessageModel.BROADCASTING); // 广播消费
   		consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET);
   		// 1分钟前开始消费
   		consumer.setConsumeTimestamp(UtilAll.timeMillisToHumanString3(DateHelper.getTimestamp().getTime() - (1000 * 60 * 1)));
   
   		consumer.subscribe(“T_MATCH_SIGNAL_DEV”, "*");
   		consumer.registerMessageListener(new MessageListenerConcurrently() {
   
   			@Override
   			public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) {
   				//do something
                                   LOGGER.info("{} consume_success", topic);
   				return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
   			}
   		});
   		return consumer;
   	}
   `
   
   在测试环境测试时,都正常消费并打印日志
   ![image](https://user-images.githubusercontent.com/23446974/44891184-8824df80-ad10-11e8-9e74-14d7b474a6aa.png)
   
   但是在rocketmq-console里显示消费点位(consumerOffset) 都是0,看起来像是全部堆积的样子
   ![image](https://user-images.githubusercontent.com/23446974/44891212-b1de0680-ad10-11e8-86e6-42f7542f7eed.png)
   
   
   请问这是属于bug还是正常的?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services