You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Barath Kumar <v....@gmail.com> on 2015/05/28 18:33:54 UTC

How to drop failed requests from queue

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

Re: How to drop failed requests from queue

Posted by Kevin Burton <bu...@spinn3r.com>.
> "setTimeToLive" works. Thanks for your help. You saved my application.
>

Ha!  That rocks!
-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>

Re: How to drop failed requests from queue

Posted by Barath Kumar <v....@gmail.com>.
Hi,

"setTimeToLive" works. Thanks for your help. You saved my application.

Regards,
Barath Kumar

On Thu, May 28, 2015 at 1:03 PM, Timothy Bish <ta...@gmail.com> wrote:

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 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 <ta...@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/
>
>

Re: How to drop failed requests from queue

Posted by Timothy Bish <ta...@gmail.com>.
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 <ta...@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/


Re: How to drop failed requests from queue

Posted by Barath Kumar <v....@gmail.com>.
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


On Thu, May 28, 2015 at 12:40 PM, Timothy Bish <ta...@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/
>
>

Re: How to drop failed requests from queue

Posted by Timothy Bish <ta...@gmail.com>.
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/