Multiple MQTT client connections from one application

2,714 views
Skip to first unread message

Michael Lauer

unread,
Jan 10, 2017, 10:33:05 AM1/10/17
to MQTT

We have a large fat client application and we want to build up the notification for several use cases with mqtt.

It is recommended to make several connections from one application to the broker.

Every use case must subscribe several distinct topics.

 

The advantage of this solution would be an easier management of the topics. If a special GUI form is opened by the user, than the mqtt connection is built up with the subscription. Wildcard subscriptions are needed.

If the GUI form is closed, the connection will be also closed. Other GUI forms with subscriptions are not affected because they have their own connection.

 

If I work with only one connection from the whole application than the maintenance of the topic sub- and unsubscription will be more difficult.


Thanks for any feedback.

Thomas

unread,
Jan 10, 2017, 11:33:12 AM1/10/17
to MQTT
Hi Michael,

Not quite sure what your question is, but my gut feeling would be to use a single connection from the (fat) client, but I suspect having multiple connections might do the trick as well. Downside would be that your broker would have to handle more connections and depending on your use case this may be a problem.

Give it a try I would say and let us know what works well for you.

Thomas

Ranjith Kumar Diraviyam

unread,
Jan 10, 2017, 12:09:50 PM1/10/17
to MQTT
I believe you want to make your fat client to act as a multiple mqtt client to the broker. 

If my assumption is right, the Bevywise IoT Simulator  can help you get this done. 

1. You can configure the simulator to connect N number of clients to the broker. 
2. Each client can be configured to subscribe / publish to multiple topics.
3. The publishing can be configured based on time or based on message received.
4. The Python interceptor can help you receive all the messages received by each client to your Fat client.  default_interceptor.py inside the lib/ folder in the product
5. The database storage mode of the simulator supports an User interface. 

We are also planning to release a complete API interface for the simulator which can help you control each client and their subscription from your fat client. 

Correct me if my understanding is wrong. 

Best Regards,
Ranjith 
CEO, Bevywise Networks

Michael Lauer

unread,
Jan 12, 2017, 1:54:47 AM1/12/17
to MQTT
Thanks for Your reply.

I will implement a single MQTT connection from the fat client to the broker.

Michael
Reply all
Reply to author
Forward
0 new messages