RE: problems with priorities

"Tim Anderson" <[email protected]> Fri, 7 May 2004 16:58:11 +1000
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Its not a bug. The JMSPriority field is set by the publish() method.
Any existing priority on the message is ignored.
You should use the following method instead:

  void publish(Message message,  int deliveryMode,  int priority,  long
timeToLive)

- Tim
  -----Original Message-----
  From: openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]On Behalf Of Kulvir
Bhogal
  Sent: Friday, 7 May 2004 4:15 AM
  To: openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
  Subject: Re: [openjms-developer] problems with priorities


  I think I have narrowed down the problem... it seems as though that when
you set a JMSpriority for a message, it does not get set.  I tried this out
with the following simple code:

  TextMessage messageOne = topicSession.createTextMessage();
  messageOne.setText("Message #1 - Priority 9 - Sport: Basketball");
  messageOne.setJMSPriority(9);
  topicPublisher.publish(messageOne);
  System.out.println(messageOne.getJMSPriority());
  One would think that you would get a priority of 9.

  However, I am getting back a priority of 4.

  This seems to be a bug.  Has anyone else experienced this?

  ~Kulvir