2 Replies Latest reply on Dec 3, 2009 8:12 PM by droberts18

    TTL on Message Producer Not Honored

    droberts18

      Using JBoss 4.3

      messageProducer.setTimeToLive(60000);

      After sending the message and waiting 10 minutes I still see it in the queue. Is this a bug?

        • 1. Re: TTL on Message Producer Not Honored
          timfox

          Firstly, I can't tell what messaging system you're using (could be JBoss MQ or JBoss Messaging), but just because a message is still in a queue after TTL does not mean TTL is not honoured.

          The JMS spec just says that messages should not be delivered after TTL is exceeded. It does not require messages to be actively removed from queues before delivery.

          If you tried to consume that message, you'd find it would get expired at the point of delivery and you wouldn't receive it, thus honouring TTL.

          Some more advanced messaging systems, like HornetQ http://hornetq.org do have active expiry of messages in queue *before* delivery but JBoss Messaging / JBoss MQ do not.

          • 2. Re: TTL on Message Producer Not Honored
            droberts18

            I am using JBoss Messaging 1.4.

            That is a good point about it never actually being delivered to the consumer.

            The reason for my concern is I am using a selector with my consumer, and I am thinking that a buildup of abandoned messages would slow down the selection/consumption of other messages.

            Do you think that should be a concern?