0

I understand that MQTT clients can get their point-to-point (P2P) topic by first subscribing to “$SYS/client/reply-to". This will return the P2P topic which the client will subscribe to. But, they need to pass this P2P topic in the message body for the subscriber of the message to reply to in a request/reply pattern. Is there a way to reduce the overhead of passing the P2P topic in the message body? Can we get the P2P topic using SEMP?

Thank you.

Koon Sang
  • 319
  • 3
  • 12
  • I think this tutorial might help you: [Request/Reply MQTT](http://dev.solacesystems.com/get-started/mqtt-tutorials/request-reply_mqtt/) – Mark Spielman Jun 09 '16 at 13:10
  • Thanks for the pointer. I am looking at how my backend program can get this reply-to topic without asking the client to pass in. – Koon Sang Jun 10 '16 at 12:54

1 Answers1

1

When using MQTT with Solace, the only way that a client can obtain its own P2P topic is by first subscribing to "$SYS/client/reply-to", as this will trigger Solace to send a message to that topic with the client's own P2P topic.

The P2P topic must be passed into the message body so that the receivers of the message know where to publish the reply. The receiver cannot retrieve the P2P topic belonging to the requester in any other way as it is has no awareness of the publisher, only the received message.

Alexandra Masse
  • 1,277
  • 1
  • 7
  • 11