activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: How to drop failed requests from queue
Date Thu, 28 May 2015 17:03:24 GMT
On 05/28/2015 12:53 PM, Barath Kumar wrote:
> Hi,
>
> Thanks for your reply. How do I set the parameter "Time To Live" ? What
> java API I should use for it.
>
> Regards,
> Barath Kumar
The docs are a good place to start
http://docs.oracle.com/javaee/1.4/api/javax/jms/MessageProducer.html

Use a MessageProducer send call that accepts a TTL or call setTimeToLive
on the producer to have it apply to all messages sent.

>
> On Thu, May 28, 2015 at 12:40 PM, Timothy Bish <tabish121@gmail.com> wrote:
>
> Have you thought about setting a Time To Live when you send the messages
> so that they get expired and removed from the Queue?
>
> On 05/28/2015 12:33 PM, Barath Kumar wrote:
>>> Hi,
>>>
>>> I am a newbie to ActiveMQ. Sometimes, I have slow consumers who sometimes
>>> do not respond to the requests. But I find these requests are still in
>> the
>>> queue. After some time, this queue gets filled and no new requests are
>>> placed in the queue.
>>>
>>> How do I drop these requests from the queue if the consumers fail to
>>> respond.
>>>
>>> I am using Active MQ version 5.5.1
>>>
>>> Regards,
>>> Barath Kumar
>>>
>> Have you thought about setting a Time To Live when you send the messages
>> so that they get expired and removed from the Queue?
>>
>> --
>> Tim Bish
>> Sr Software Engineer | RedHat Inc.
>> tim.bish@redhat.com | www.redhat.com
>> twitter: @tabish121
>> blog: http://timbish.blogspot.com/
>>
>>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message