lyxaaadf opened a new issue #111: how to register registerMessageListener
URL: https://github.com/apache/rocketmq-spring/issues/111
 
 
   alibaba give translation demo :
   consumer.registerMessageListener(new MessageListenerConcurrently() {
   
               @Override
               public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> 
msgs,
                   ConsumeConcurrentlyContext context) {
                for(MessageExt msg:msgs){
                        try {
                                                
System.out.println("消息内容为1:"+new 
String(msg.getBody(),RemotingHelper.DEFAULT_CHARSET));
                                        } catch (UnsupportedEncodingException 
e) {
                                                // TODO Auto-generated catch 
block
                                                e.printStackTrace();
                                        }
                }
                   return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
               }
           });
   
   
   but our's ,i cant find this ,so What should I do?
   our's  demo:
   
   @Service
   @RocketMQMessageListener(topic = "tro",consumerGroup ="evaluation-trans")
   public class MyTransactionConsumer implements RocketMQListener<String>{
   
        @Override
        public void onMessage(String message) {
                System.out.println("consumer:....."+message);
                
        }
        
        
   
   }
   tell me .pls
   

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


With regards,
Apache Git Services

Reply via email to