You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by All JN <jn...@gmail.com> on 2014/09/08 11:25:36 UTC
Apollo: Messages always persists
Hello,
I’m trying to use Apollo 1.7.
I’m facing a problem with my first JMS test: I use a non-persistent
delivery mode, the messages are persisted and survive to a restart.
Someone can explain me?
Thx.
Re: Apollo: Messages always persists
Posted by Hiram Chirino <hi...@hiramchirino.com>.
That's just the way apollo works. It does not guarantee
non-persistent messages will survive a restart, but it does not go out
of it's way to drop them if there is a restart. Basically if your
message gets paged out to disk, it will survive.
On Mon, Sep 8, 2014 at 5:25 AM, All JN <jn...@gmail.com> wrote:
> Hello,
>
>
>
> I’m trying to use Apollo 1.7.
>
> I’m facing a problem with my first JMS test: I use a non-persistent
> delivery mode, the messages are persisted and survive to a restart.
>
> Someone can explain me?
>
>
>
> Thx.
--
Hiram Chirino
Engineering | Red Hat, Inc.
hchirino@redhat.com | fusesource.com | redhat.com
skype: hiramchirino | twitter: @hiramchirino
Re: Apollo: Messages always persists
Posted by All JN <jn...@gmail.com>.
Is there someone who experimented this behaviour?
ActiveMQ Core 5.7 as client on Apollo 1.7. Here's a code sample:
Connection conn = cf.createConnection();
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer =
sess.createProducer(sess.createQueue("device0"));
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
int msgCounter = 0;
while(true) {
String body = String.format("%01024d",msgCounter++);
Message m = sess.createTextMessage(body);
producer.send(sess.createQueue("device0"), m);
if(msgCounter%1000==0)
System.out.println("messages:"+msgCounter);
}
2014-09-08 11:25 GMT+02:00 All JN <jn...@gmail.com>:
> Hello,
>
>
>
> I’m trying to use Apollo 1.7.
>
> I’m facing a problem with my first JMS test: I use a non-persistent
> delivery mode, the messages are persisted and survive to a restart.
>
> Someone can explain me?
>
>
>
> Thx.
>
>
>