Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Retrieve messages with maximum priority

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I need to retrieve messages from a queue with maximum priority. Hope i cannot set a MessageSelector query like this 'MAX(JMSPriority)'. Hence, i am creating two message consumers say consumerWithExpeditedPriority with MessageSelector string as 'JMSPriority > 4' and consumerWithNormalPriority with MessageSelector string as 'JMSPriority <= 4'.
First i am attempting to receive through the first consumer and if the message is null, i am trying out the second.
Is this the good way of implementation? Moreover, here i could classify only 2 levels of priority (normal and expedited) since i created two consumers. Actually, i needed all the 10 levels of JMSPriority to be handled out separately.

Please provide your valuable suggestions

Thanks and Regards,
Balaji N
 
reply
    Bookmark Topic Watch Topic
  • New Topic