activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From All JN <jna67...@gmail.com>
Subject Re: Apollo: Messages always persists
Date Wed, 17 Sep 2014 12:42:34 GMT
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 <jna67814@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.
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message