You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Bruce Snyder <br...@gmail.com> on 2008/12/23 04:50:11 UTC

Re: Unable to setup : Default Persistence in ActiveMQ

On Mon, Dec 22, 2008 at 8:34 PM, ABHATNAGAR <bh...@hotmail.com> wrote:

> My Messages are not getting saved : when my BROKER goes down.

Are you sending persistent messages? By default messages are
non-persistent. If you want messages to be persistent you must
explicitly enable this functionality via either the
Message.setJMSDeliveryMode() method or the
MessageProducer.setDeliveryMode() method. See the JMS API for more
information:

http://java.sun.com/javaee/5/docs/api/javax/jms/Message.html#getJMSDeliveryMode()
http://java.sun.com/javaee/5/docs/api/javax/jms/MessageProducer.html#setDeliveryMode(int)

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Re: Unable to setup : Default Persistence in ActiveMQ

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, Dec 23, 2008 at 2:37 AM, James Strachan
<ja...@gmail.com> wrote:
> 2008/12/23 Bruce Snyder <br...@gmail.com>:
>> On Mon, Dec 22, 2008 at 8:34 PM, ABHATNAGAR <bh...@hotmail.com> wrote:
>>
>>> My Messages are not getting saved : when my BROKER goes down.
>>
>> Are you sending persistent messages? By default messages are
>> non-persistent. If you want messages to be persistent you must
>> explicitly enable this functionality via either the
>> Message.setJMSDeliveryMode() method or the
>> MessageProducer.setDeliveryMode() method. See the JMS API for more
>> information:
>
> Wrong way around - messages are persistent by default

Whoops - I'm thinking of the ActiveMQ examples. My mistake.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Re: Unable to setup : Default Persistence in ActiveMQ

Posted by James Strachan <ja...@gmail.com>.
2008/12/23 Bruce Snyder <br...@gmail.com>:
> On Mon, Dec 22, 2008 at 8:34 PM, ABHATNAGAR <bh...@hotmail.com> wrote:
>
>> My Messages are not getting saved : when my BROKER goes down.
>
> Are you sending persistent messages? By default messages are
> non-persistent. If you want messages to be persistent you must
> explicitly enable this functionality via either the
> Message.setJMSDeliveryMode() method or the
> MessageProducer.setDeliveryMode() method. See the JMS API for more
> information:

Wrong way around - messages are persistent by default

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/