• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Using multiple destination queue

 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following Java process which is listening to MyMessageQueue queue of ActiveMQ.And I can see the message getting retrieved using this statement  inside
processBrokerQueues method.



 
 I am wondering, if I want to listen to 20-30 different queues, Is it the correct way to add multiple  @JmsListener(destination = "MyMessageQueue") with different queue names like MessageQueue1, MessageQueue2 ....... so on and so forth until MessageQueue30?
 
Bartender
Posts: 2264
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean multiple destinations for the @Jmslistener ? According to the API, we can only have one destination.

But if you have multiple methods and they listen to different queues, you can give the destination unique names.
 
reply
    Bookmark Topic Watch Topic
  • New Topic