dajood
dajood

Reputation: 4050

(How) can i route a message to one particular client?

I'm trying to understand the principles of HornetQ as well as core/JMS messaging using this solution.

In my experimental app, I'd like my end-user application(client) to send messages to a HornetQ which will be read by a backend app. So far this is no problem and I love HornetQ.

But now, i'd like to send an "answer" message from the backend app back to the end-user. For this, I have the condition that no other client app should be able to read the answer message (let's say it contains the current bank balance). So user A should only fetch messages for himself and the same applies to any other user.

Is this possible using HornetQ? If so, how do I have to do it?

Upvotes: 0

Views: 111

Answers (1)

Clebert Suconic
Clebert Suconic

Reputation: 5383

with hornetq (or any other message system) you always send to a queue, not to a specific consumer.

ON this case you have to create a queue matching your client.

This answer here will provide you some feedback on request-response where I won't need to repeat myself after this approach:

Synchronous request-reply pattern in a Java EE container

Upvotes: 2

Related Questions