blazingmq-sdk-python icon indicating copy to clipboard operation
blazingmq-sdk-python copied to clipboard

Add example of a producer that correlates posts with acks/nacks

Open pniedzielski opened this issue 1 year ago • 0 comments

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:

  1. 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.

  2. 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.

  3. 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

pniedzielski avatar Jul 22 '24 20:07 pniedzielski