MetPX / wmo_mesh

minimal sample to demonstrate mesh network with a pub/sub message passing protocol (mqtt in this case.)
GNU General Public License v2.0
4 stars 2 forks source link

Add AMQP 0-9-1 to the wmo_mesh demo. #5

Open petersilva opened 5 years ago

petersilva commented 5 years ago

it should be reasonably straight-forward to add the ability to specify amqp: as the start of a broker URL, and then have the wmo_mesh demo work with amqp brokers similarly to how it works with mqtt ones. The main changes:

Bindings are stateful in AMQP, and hard to maintain because the protocol allows no means of inspecting them, so the only option for now is the sledgehammer of delete/recreat.

Probably want to add a --exchange option, as the exchange one is subscribing to is currently not settable, and they can be different in practice.

petersilva commented 5 years ago

About 0-9-1 ... it says amqp-0-9-1 because I'm expecting people to use python3-amqp package, same as the latest Sarracenia... I guess people could use python3-pika as well. We have not had success with pika... although others have.

The other reason it says 0-9-1, is that one cannot do pub-sub with later versions of AMQP, one cannot declare exchanges, queues, or bindings. so and AMQP 1.0 wmo_mesh client just isn't possible.

petersilva commented 5 years ago

There is now an amqp subdirrectory, but all it does is include instructions for how to use Sarracenia to implement the mesh. The actual scripts do not support AMQP, and remain an MQTT only demonstration. This issue is about adding AMQP to the scripts themselves.