rocketmq-client-cpp
rocketmq-client-cpp copied to clipboard
Apache RocketMQ cpp client
void DefaultMQPullConsumer::persistConsumerOffset4PullConsumer(const MQMessageQueue& mq) { // impl->persistConsumerOffsetByResetOffset(mq); } this was comment out, After the application is restarted, how can I ensure no repeated consumption
**code is this:** // consume message int doConsumeMessage(struct CPushConsumer *consumer, CMessageExt *msgExt) { cout
relation issues: - https://github.com/apache/rocketmq-client-cpp/issues/355 - https://github.com/apache/rocketmq-client-cpp/issues/361 when boost update to 1.72.0 os: macos  if use default boost, there will happen [355](https://github.com/apache/rocketmq-client-cpp/issues/355)
需求如题,我们目前使用rocketmq-client-python消费消息,业务不关心5分钟前的数据,所以需要在启动时设置consume_from_timestamp为五分钟前,以跳过老消息,降低消费者压力,但因为cpp client没有暴露ConsumeFromWhere 相关的设置接口,python client无法实现对应功能,希望cpp client可以暴露下ConsumeFromWhere 相关的get/set接口,谢谢!
https://github.com/apache/rocketmq-client-cpp/blob/d0f65a191b9e9609939da719d13548898d73f225/src/consumer/DefaultMQPushConsumerImpl.cpp#L799 并不是说这行有bug,而这里m_PullCallback是复用的,而绑定request是可变的。在多client进程并发重启时候,容易触发某个queue短时间内被Add、Drop然后又Add,就会触发重复消费case: 1. 线程1: 队列queue1的请求A触发Add mq,绑定cb1,生成 cb1 = getAsyncPullCallBack(A,queue1) 2. 线程2: 队列queue1的请求A触发Drop mq,然而只是设置了下drop flag,实际清理工作在pull循环里面 3. 线程3: 队列queue1的请求B触发Add mq,绑定cb1 = getAsyncPullCallBack(B,queue1),因为cb是复用的,返回了和线程1一样的cb1, 这是cb1绑定是B,所以线程1这时也绑定了B 4. 线程1: 将cb1加到pull循环工作,原本希望将A加入pull循环结果却将B加入到循环 5. 线程3: 将cb1加到pull循环工作,将B加入到循环 6. 这时就2个pull循环在在跑请求B,导致重复消费 因为cb是复用的而绑定的requst随时有可能被别的request替换掉导致加入pull循环时候导致重复消费;
## Due Diligence It is well known that the multi-language clients of the RocketMQ community (with the exception of Java) are built around the c++ kernel. We have always attached...
I use a simple code to only receive rocketmq normal messages and orderly messages. Return true when the message is received. The sender sends a packet of ordinary data and...
new version clang report "xxx" is invalid in C99 error referring [https://www.gitmemory.com/issue/boostorg/build/664/714882384]() advice to upgrade to 1.72.0
error log: “unknown file: error: C++ exception with description "[MQClientException] msg: create offset store directory failed: C:\Users\e0614688\.rocketmq_offsets\fe80::5c03:7258:6b59:5e16@testConsumer\testConsumer, error: -1, in " thrown in the test body.” It was found in...
版本2.2.0 core栈信息: 