Retry feature
Hi Siddartha, Please let me know what the logic is for the retry feature in the OnError method (in the com.optum.pubsub.Subscribe class). In case if there is any failure and I want to try to consume a failed batch of the messages from the target topic...I just need some guidance.
Thanks, Meruzha
Did you get any answer to this? I have a similar issue where I am getting an error intermittently on one of the PubSubEventObserver threads and not sure how to restart subscription on that channel only, the error I am getting is
io.grpc.StatusRuntimeException: UNAVAILABLE: RST_STREAM closed stream. HTTP/2 error code: NO_ERROR
Hi Siddartha,
As per PubSub documentation, If the server sends all requested events to the client, there are no more pending events to be delivered and pending_num_requested in FetchResponse is equal to zero. In this case, to keep the subscription stream open, the client must send a new FetchRequest within 60 seconds from when the last FetchResponse was sent. If the client fails to do so, the subscription stream closes and the client must call Subscribe again to open a new stream (I noticed that your retry feature replicates the same concept).
We noticed that if the execution time takes more than 60 seconds and as per documentation we open a new stream, but in fact, connection goes into stale mode and there is no error at all.
Have you ever encounter this issue (for example, you can produce at least several hundred or thousand messages using your desired topic, then set the batch size to 100, and run the client subscriber)? If so, what was a solution.
Thanks again, Meruzhan