Koon Sang
Koon Sang

Reputation: 328

Does Solace support DTO with MQTT?

I have many devices sending data to the backend server via Solace using MQTT. As I need to handle large volume of incoming messages, I am thinking of starting a few listener instances to process the incoming messages. But, it does not help as MQTT pub/sub is effectively a 1-to-many messaging, i.e. the same message will be delivered to all subscribing listeners. I know Solace supports DTO but does it support DTO using MQTT? If so, how do I do that? If not, any suggestion how I could start multiple listeners to process the large amount of incoming messages? What I have in mind now is to create Queues with non-exclusive delivery that subscribe to these topics. Not sure whether there are other better way.

Thank you.

Upvotes: 1

Views: 234

Answers (1)

Russell Sim
Russell Sim

Reputation: 1733

The MQTT protocol does not have a feature to deliver messages to consumers in a round robin manner.

I'm assuming that your back-end servers are not using MQTT to receive the messages.

You can either:

  1. Distribute the load by publishing to different topics.
  2. Have a non-exclusive queue subscribe to the topic, and let the queue distribute the messages to the consumers in a round robin fashion.

Note that option 2, is the correct option if your publishers are publishing QoS 1 messages. Messages to be consumed by your back-end servers will be spooled in the queue if all of your consumers go offline. Without the queue, messages will be discarded if there are no online consumers.

Upvotes: 3

Related Questions