bloomberg / blazingmq-sdk-python

Python SDK for BlazingMQ, a modern high-performance open source message queuing system.
https://bloomberg.github.io/blazingmq/
Apache License 2.0
24 stars 6 forks source link

Update `QueueOptions` docs and examples #37

Closed pniedzielski closed 4 months ago

pniedzielski commented 4 months ago

While investigating a user's consumer code, I was confused by the expression QueueOptions(0, 0, 0), which was taken from our example code. Our docs did not shed any light. The investigation documented in the commit message in this PR led me to find that our documentation is incorrect for max_unconfirmed_messages and max_unconfirmed_bytes.

The changes in this PR are meant to avert other users from having the same confusion I faced: (1) improve the documentation for these queue options in the Python SDK, taking the behavior documented in the C++ SDK and adding it to the Python docs, and (2) changing the example consumers we provide from using positional arguments to named arguments, so it is more clear from looking at the examples what queue options we're setting. The latter change makes it a little more apparent that we are not using the default queue options in these example consumers.

Closes: #36