Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example of reliable consumer #109

Merged
merged 1 commit into from Aug 18, 2022
Merged

Commits on Aug 18, 2022

  1. Add an example of reliable consumer

    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 <acedres@vmware.com>
    Zerpet committed Aug 18, 2022
    Copy the full SHA
    feb4ba5 View commit details
    Browse the repository at this point in the history