Hi,
I'm trying to write a simple test to use the priority queues.
I have a couple of questions.
Can I create priority queues on the fly at run-time?
if I use session.createQueue("queueName ;{create: always , node : {type :
queue, durable : true, priority : true}}"); will the queue be created as a
priority queue?
I've created my queue like the above, and tried to enforce priority on
messages by using the Producer.setPriority() before producing message and
also by setting the priority in the message.setJMSPriority() call,
I also tried explicitly providing the priority in the
Producer.send(Destination, message, deliverymode, priority, ttl) JMS
call...but all the above doesn't seem to work for me.
In both cases,
I create a priorty queue,
enqueue message with lesser priority
then, enqueue 1 message with higher priority
consume from the queue
i expect to get the message with higher priority first. (but it doesn't work
right for me).
Can someone please let me know what I could be doing wrong.
If there is an example that I could use, it will be great.
Thank you,
--
-Praveen