How do streams handle consumer confirmations? #12126
-
What happens if I don't receive the message the broker sent?
So, if there is no mechanism recover message lost, what can consumer do? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
@laststem we need an executable way to reproduce. We will not guess what your code does, what client library you use, and so on. We do not guess in this community. |
Beta Was this translation helpful? Give feedback.
-
If this is a general question about the stream protocol and how it handles confirms on the consumer side, then after step 4 the connection will very likely be be considered closed (the general problem is described in the Heartbeats guide). The consumer can recover (open a new connection) and begin consuming again. There is a brief mention of this in Stream tutorial 2:
In other words, like with any other protocol, consumers sometimes will have to be ready to recover |
Beta Was this translation helpful? Give feedback.
-
Why would you not receive it? Is this something you have seen in use / testing? Please provide an executable example. |
Beta Was this translation helpful? Give feedback.
Note message offset may not be contiguous, because a stream can contain other entries than messages and those entries will have their own offsets. Don't base your logic on offset contiguity. You can use your own sequence or check offsets always move forward (but they may actually go backward in case of duplicate messages, which are unlikely but can happen).