How to receive/subscribe to mqtt request via django without external broker

Viewed 44

I have owned a server based on djnago and i need to get mqtt messages from a device directly to my server without any external brokers. How to do this? I need only request response and there is no need of broadcasting. Since it is an iot application.

What iam asking is is there any way to just collect a message and send back response using mqtt protocol ,or any method to create our own djnago based broker

1 Answers

To use MQTT you will always need a broker running somewhere. It doesn't need to be in the same location as any of the clients that will connect to it.

If you currently have a Django hosting provider it is very unlikely that you will be able to use it to also host a MQTT broker as it is very likely that this will be hosted using hostname based virtual hosting.

If you want to run your own broker then you will need a static private IP address.

As well I am unaware of and Python based libraries that will help you build a broker.

Related