How to correctly drain replies after unsubscribing? #1291
Unanswered
davide-scalzo
asked this question in
Q&A
Replies: 1 comment
-
|
Try to flush either after publishing, or at-atleast before shutting down. Client publish goes into a write buffer. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR: I have a test service that I am trying to wrap in a graceful shutdown wrapper. What I'm seeing is that after unsubscribing the last reply does not get sent the counterparty service that issued the request.
The wrapper spawns an
application_taskthat requires a tokioTaskTrackerand a shutdown signal. Once the shutdown signal is received (e.g. ctrl+c) the task tracker gets closed and awaited in order to complete any pending tasks (requests) handled by the application task.The content of the application_task looks like this:
The logs look like this:
Any suggestion, on what I'm doing wrong / how to handle un-subscription correctly?
Beta Was this translation helpful? Give feedback.
All reactions