-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The example function Example_consume() shows how to write a consumer with reconnection support. This commit also changes the notification channels to be buffered with capacity of 1. This is important to avoid potential deadlocks during an abnormal disconnection. See #32 and #18 for more details. Both example functions now have a context with timeout, so that they don't run forever. The QoS of 1 is set to slowdown the consumption; this is helpful to test the reconnection capabilities, by giving enough time to close the connection via the Management UI (or any other means). Signed-off-by: Aitor Perez Cedres <[email protected]>
- Loading branch information
Showing
1 changed file
with
86 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters