Add RabbitMQ helpers (`SelectConnection`)
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
This MR adds methods that facilitate sending and consuming messages from RabbitMQ. They will wrap calls to the pika
module and provide connection and error-handling for callers.
Unlike the implementation in !679 (closed), the PikaConsumer
in this MR uses pika's Select Connection Adapter
Changes proposed in this merge request:
-
Implement
PikaConsumer
andPikaPublisher
classes -
Adjust requirements,
tox.ini
, and CI to run tests usingpika
-
Test retry logic
Validation
I've been using this standalone script that allows to start a publisher and consumer from the command line in order to verify that messages get to the right callbacks and that that the retry logic works (by manually restarting RabbitMQ.)