Apollo: Messages always persists

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Apollo: Messages always persists

All JN
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.
Reply | Threaded
Open this post in threaded view
|

Re: Apollo: Messages always persists

All JN
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 <[hidden email]>:

> 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.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Apollo: Messages always persists

chirino
In reply to this post by All JN
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 <[hidden email]> 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.
[hidden email] | fusesource.com | redhat.com
skype: hiramchirino | twitter: @hiramchirino