Skip to content

crossz/RocketMQ

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RocketMQ -- Alibaba's MQ Build Status

PullConsumer example:

how to run

  1. modify the namesrv_addr in the TestProducer.java:

roducer.setNamesrvAddr("xxx.xxx.xxx.xxx:9876");

  1. modify the namesrv_addr in the TestPullConsumer.java:

consumer.setNamesrvAddr("xxx.xxx.xxx.xxx:9876");

Notes:

// consumer.fetchConsumeOffset(mq, false) will updateOffset again, so before exiting, have to update the offset again.
consumer.updateConsumeOffset(mq, pullResult.getNextBeginOffset());
if (counter==0 && !isEmptyQ) Thread.sleep(1000 * 30);
// only counter==0 to delay 30 seconds to initialize the background thread for update offset on store.
counter++;

About

🚀 Alibaba's MQ, also aliyun ONS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 98.6%
  • Shell 1.3%
  • Batchfile 0.1%