< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Qpid Proton (AMQP) integration



I've recently been looking at the Qpid Proton examples[1] and copied
them to do a couple of small things with reSIProcate:

- repro can now send the Reg Sync XML messages to a topic[2], this is
useful for informing other processes about registrations but repro
doesn't (yet) listen to the topic to receive the notifications from
other repro instances

- registration-agent can now receive commands over a queue[3]

Some other potential uses for AMQP:

- providing an alternative to the repro command socket
- sending messages to HOMER over AMQP instead of UDP
- sending stats messages to a monitoring framework
- sending log messages

The repro Reg Sync code currently uses XML but I'm tempted to use JSON
(and the cajun-json library we already link with) for things we do on
AMQP in future.

The Qpid Proton C++ API is quite easy to understand but it is still
evolving.  The Qpid Proton community have been quite helpful and open to
feedback through their mailing list.

They also have Python bindings and examples[4], I extrapolated from one
of them to send test commands into the queue[5]

I've been testing this with RabbitMQ on Debian, to install the package
and enable the AMQP 1.0 support:

   apt-get install rabbitmq-server
   rabbitmq-plugins enable rabbitmq_amqp1_0
   systemctl restart rabbitmq-server


and to get the compile dependencies and Python bindings:

   apt-get install -t jessie-backports \
      libqpid-proton8-dev \
      libqpid-proton-cpp8-dev \
      python-qpid-proton



Regards,

Daniel


1.
https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/cpp/examples/index.html
2.
https://github.com/resiprocate/resiprocate/commit/71654335bb5b0ea37da20ef76e0328785b943193
3.
https://github.com/resiprocate/registration-agent/commit/418d8f7295b56fe7ee251415e23e8635ed23cecf
4.
https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/index.html
5. https://github.com/resiprocate/registration-agent/blob/master/send-cmd.py