lerenn / asyncapi-codegen

An AsyncAPI Golang Code generator that generates all Go code from the broker to the application/user. Just plug your application to your favorite message broker!
Apache License 2.0
95 stars 23 forks source link

Add subscription cancellation information #37

Closed lerenn closed 1 year ago

lerenn commented 1 year ago

When using a callback or a loop over a subscription, there is no mean to know when the latter is cancelled and potentially clean up resources or throw an error.

This commit introduces this information as a boolean in argument of callback in SubscribeXXX and as an error in WaitForXXX.