1
votes

Is this possible in a publish/subscribe pattern?

  1. A publisher publishes a message to a topic;
  2. Subscriber(s) receive(s) the message;
  3. The subscribers reply to publisher with a custom message.

Is step 3 possible? I'm designing a system that will use MQTT protocol (communication between smartphones and microcontrollers). However, the subscriber needs to send an answer to the publisher other than the Acknowledged message.

1

1 Answers

2
votes

There is no way to directly reply to the a message in a MQTT system, but there is nothing to stop you using 2 topics (outboud/inbound) and including a message id in the payload of the message to identify the reply to the original published message