Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
petersilva opened this issue Feb 15, 2019 · 2 comments
Open

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

petersilva opened this issue Feb 15, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@petersilva
Copy link
Contributor

petersilva commented Feb 15, 2019

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:

  • need to declare the exchange one is publishing (--post_exchange) to (equivalent to the root of the topic tree.) It needs to have certain properties... durable=true, etc... I would copy whatever Sarracenia does by default, as it is the result of years of tuning.

  • need to declare the queue_name, one can use the mqtt 'client_id' as the queue name...

  • --clean_session in wmo_mesh means essentially deleting the queue and exchange, and then re-creating them. This will clear out all old bindings.

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
Copy link
Contributor Author

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 petersilva added the help wanted Extra attention is needed label Feb 17, 2019
@petersilva
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant