Why Stream Queue's can not consume messages on the last offset when restart consumer? #278
-
I have a problem about stream queue I have declare a consumer with property "x-stream-offset": "next", when I consume message, It is OK! And then I close the consumer,and producer still send message to the queue. At Last I start consumer again, But I can't keep consuming since the last offset I don't know what the "next" mean? there is my code:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You have the meaning for each offset specification documented here: https://www.rabbitmq.com/docs/streams#client-operations You have to keep track of the last offset that your consumer acknowledges. If you want to start consuming from the last ack'ed offset, you have to set the stream offset as |
Beta Was this translation helpful? Give feedback.
You have the meaning for each offset specification documented here: https://www.rabbitmq.com/docs/streams#client-operations
You have to keep track of the last offset that your consumer acknowledges. If you want to start consuming from the last ack'ed offset, you have to set the stream offset as
offset
and specify the last consumed offset + 1. If you want to use automatic consumer tracking, you have to enable the stream plugin, and use one of the stream clients: https://www.rabbitmq.com/docs/stream