firestruq
firestruq

Reputation: 739

How can we know which consumer get the message from queue on JMS?

I would like to know how can we tell which consumer will get the message from queue in case we have multiple consumers at JMS queue? for example, if we have 1 producer and 3 consumer (and 1 queue), how can i know which consumer gonna get the message?

thanks

Upvotes: 0

Views: 2146

Answers (1)

Aravind Yarram
Aravind Yarram

Reputation: 80176

There are 2 ways of comm with messaging: point-to-point and publish-subscribe.

In p2p there is only 1 consumer. in pub/sub the message is published to multiple subscribers and the subsribers can selectively process the messages using filters. For more details read the 3.5.2 Message Selectors section in jms tutorial.

Upvotes: 1

Related Questions