• 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
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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: 2113
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.
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic