Skip to content

Core NATS request reply supplies it's own reply-to address #747

Answered by scottf
LLLLimbo asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is that you are replying to the wrong subject. When you make the request in java, your replyTo("replyto.123") is ignored, the client makes a reply to that looks like this _INBOX.vqNUxbuYpUUHepWvptfH5M.vqNUxbuYpUUHepWvptfH8c
On the mqtt side, you must look at the exact replyTo that is with the message you receive and publish to it.

If you can't access the reply-to field on the mqtt side, then what I would do is used fixed subjects, have java just publish (not request) to request.123 and then be a subscriber to fixed subject reply.123

Also, in the case of a publish, the client will not provide it's own reply-to so you could use that to provide your own subject. You can also use …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by scottf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #745 on September 27, 2022 12:06.