Shamish
Shamish

Reputation: 1

Receiving messages from all/multiple the queues from JMS server

I want loop all the queues in MQ server and log the messages. For this trying to generate destinations dynamically.

I am using SpringBoot and @JmsListener(destination = "Regulatory_"). Tried substituting destination with EL, with bean property injection,. Some how not able to get it working.

Is it possible some how or the requirement itself seems to be wrong?

Upvotes: 0

Views: 117

Answers (1)

Axel Podehl
Axel Podehl

Reputation: 4323

a message on a queue is, by design, meant for one consumer only. If you also want to log messages someplace else, it's a good reason to switch to JMS topics instead. Then you simply setup a second consumer that does nothing but log the messages.

Which JMS Provider are you using ? ActiveMQ ? Usually a JMS provider has some way of 'bridging' destinations which is another way of creating duplicates.

Upvotes: 1

Related Questions