Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieve messages with maximum priority

Balaji Natarajan
Posts: 29
  • Mark post as helpful
  • send pies
  • 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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic