activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pico Florin <picoflo...@yahoo.co.uk>
Subject Re: Setting the Delivery Mode for a message
Date Fri, 06 Oct 2006 13:11:03 GMT
Thank you very much Rob! It works! I don't know what is the sense of the method
  setJMSDeliveryMode() in the Message interface if it hasn't any effect or how it can be used?

Rob Davies <rajdavies@gmail.com> wrote:  Unfortunately this  is a common mistake  -
in that your setting the  
delivery mode on the message - it needs to be set on the producer!

On 6 Oct 2006, at 10:11, Pico Florin wrote:

> Hi!
>    I want to know how you can set up the delivery mode for a  
> message that shoul be sent. I have made something like this:
>
>   T extMessage replyMessage = session.createTextMessage();
>      replyMessage.setText(contents);
>     replyMessage.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
>               replyMessage.setJMSCorrelationID(requestMessage
>                   .getJMSMessageID());
>
>                 replyProducer.send(replyMessage);
>   System.out.println("\tDeliveryMode:   "
>                             + replyMessage.getJMSDeliveryMode());
>
>
>     but the latest  code still print 2, meanig  
> DeliveryMode.PERSISTENT. Also on the client  that receives the  
> message the same mode is received. I want the same  thing for the  
> client that the messages that shoul be delivered to the  server( I  
> have a P2P architecture) to have the same delivery mode. I  have  
> made something like this:
>    requestMessage.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
>           requestProducer.send(requestMessage);
>   but when I'm printing out the PERSISTENT mode is printed.
>
>   Thank you,
>     Florin
>
>
>
>
>    
> ---------------------------------
>  All new Yahoo! Mail "The new Interface is stunning in its  
> simplicity and ease of use." - PC Magazine



 		
---------------------------------
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message