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

Send messages from application server to MQTT broker #2

Open
edigiacomo opened this issue Jul 26, 2016 · 0 comments
Open

Send messages from application server to MQTT broker #2

edigiacomo opened this issue Jul 26, 2016 · 0 comments

Comments

@edigiacomo
Copy link
Owner

2 possible implementation:

Channel

Channel mqtt.pub with the following keys:

  • topic
  • payload
  • qos
  • host?
  • port?

asgimqtt should read the messages from this channel and send them to MQTT broker. asgimqtt is also a subscriber, so the message will be received from the broker and sent to mqtt.sub.

There's a problem: the channel must be consumed by asgimqtt

MQTT broker

The message is sent to the MQTT broker (similar to sending an email in ASGI definition), e.g.

import paho.mqtt.publish as publish

publish.single("/path/to/topic", "payload", hostname="localhost")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant