Skip to content

Client-side offset tracking and old messages #151

Closed Answered by acogoluegnes
staswilf asked this question in Q&A
Discussion options

You must be logged in to vote

Context#offset() should return the (unique) offset of the delivered Message. You're right, it should always return the same value in the context of a single to handle. It should increment in the next calls, under normal circumstances (no reconnection, etc).

The behavior you're observing is not normal. Your code seems correct. Which versions of Erlang/RabbitMQ/Java client are you using? Can you provide the server logs and the client logs?

Are you able to reproduce this behavior?

There can be duplicated messages e.g. when the connection dies and the client recovers it, but this should not happen if your offset tracking is reliable and is updated for each message.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@acogoluegnes
Comment options

Answer selected by acogoluegnes
@staswilf
Comment options

@acogoluegnes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants