Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » MQTT Subscriber Parallel Processing(Multiple Instance Of Subscriber For A Given Topic)
MQTT Subscriber Parallel Processing [message #1718540] Sat, 26 December 2015 15:21 Go to next message
Rahul Opengts is currently offline Rahul OpengtsFriend
Messages: 2
Registered: November 2015
Location: Pune
Junior Member
Dear All,
Need help in build a project around MQTT.

I have a mosquitto broker running on my server. I will using Eclipse Paho for pub and sub.

My subscriber will be receiving multiple messages from multiple publisher.
For example there is a topic called "MyTopic". My MQTT Subscriber will subscribe to MyTopic. There will be hundreds of Publisher client publishing to MyTopic.

Is there a way to create parallel instances of the Subscriber so that messages delivered to MyTopic are processed in parallel. This will help to speed up the processing in case many publishers publish the message to MyTopic at same time.

Please help.

Regards


Regards,
Rahul
Re: MQTT Subscriber Parallel Processing [message #1718630 is a reply to message #1718540] Mon, 28 December 2015 13:22 Go to previous messageGo to next message
James Sutton is currently offline James SuttonFriend
Messages: 71
Registered: July 2015
Member
Hi,

Any subscriber will receive all messages published to it's topic (Ignoring QoS), there isn't any way to have a cluster of subscribers.

However, you could have one subscriber for "MyTopic" that puts all incoming messages onto a queue. Then you could create multiple threads in your application that can take messages off the queue and process them asynchronously.
Re: MQTT Subscriber Parallel Processing [message #1718702 is a reply to message #1718540] Tue, 29 December 2015 10:54 Go to previous messageGo to next message
Ian Craggs is currently offline Ian CraggsFriend
Messages: 83
Registered: March 2013
Member
Hi Rahul,

load balancing of subscriptions is a server specific function for now, there is nothing in the MQTT specification about it, although it is one of the topics for discussion for possible inclusion in future versions of MQTT.

IBM MessageSight for example, does have its own implementation of shared subscriptions. You should ask in the Mosquitto forum/mailing list if there are any plans for Mosquitto to do so, if it doesn't already.

Ian
Re: MQTT Subscriber Parallel Processing [message #1749801 is a reply to message #1718702] Mon, 12 December 2016 14:06 Go to previous message
El Mehdi IFEGH is currently offline El Mehdi IFEGHFriend
Messages: 1
Registered: December 2016
Junior Member
Hi I have the same probleme , the diffrence is when I create a pool of threads , they will subscibe to the same topic an execute the same message any time .
I need to know how I can parametre each thread in order to execute one message and others threads will execute the incoming messages .
Please can you help me.

Best regards.

Mehdi
Previous Topic:implementation of paho
Next Topic:Set TTL for Mqtt Connection
Goto Forum:
  


Current Time: Fri Apr 26 09:47:35 GMT 2024

Powered by FUDForum. Page generated in 0.03598 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top