Add example of a producer that correlates posts with acks/nacks #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've had several users ask us how to correlate a message's post with its ack or nack. The way we intend is to provide a different closure for each message's
on_ack
, including any information that that callback may need to correlate the message. This PR introduces an example documenting this.There are three patches in this PR:
Add post/ack correlation example. Here, we add a simple example of a producer that correlates posts with acks or nacks. We also add this to the test suite, to ensure that the example works as intended.
Extend the existing producer test with additional checks. The new producer example test has some additional checks that also make sense in the existing producer example test, so we also add them there.
Document an expected crash dialog on OSX when running integration tests. This test induces a deadlock so that it can verify that the library detects that deadlock. On Linux machines, the deadlock crash is silent as well as intentional. However, on OSX machines, depending on their configuration, each crash causes a dialog box to appear, telling the user that a crash occurred. This is annoying, but it is a product of the intention of the test.
Closes: #42