activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Shannon <christopher.l.shan...@gmail.com>
Subject Re: Force Producer to fail when blocked by slow consumer?
Date Mon, 04 Apr 2016 16:01:05 GMT
There are a couple options you can configure.  Take a look at this page
http://activemq.apache.org/producer-flow-control.html

Look at the sendFailIfNoSpace and sendFailIfNoSpaceAfterTimeout options.
These will allow the producer to fail immediately or after a set amount o
time instead of waiting indefinitely.

On Mon, Apr 4, 2016 at 11:18 AM, Paulon <oneillp@dnb.com> wrote:

> Hey,
>
> we have a setup whereby we are sending persistent messages to an MQ in
> SessionTransacted batches.
>
> The problem we are facing is that if the MQ fills up, our producer blocks
> indefinitely.
>
> We dont have control over the server side queue, so we need to be able to
> abort sending (rather than wait forever)
>
> We have set the sendTimeout on the connectionFactory however, while this
> throws the expected exception, any attempt to do a session.close() blocks
> waiting for a Response object.
>
> Is there a way to get the blocked send call to just fail/timeout to enable
> us to close the session/connection object and terminate the thread/process?
>
> Otherwise we are at the mercy of a slow/poorly configured consumer that can
> block our system.
>
> Cheers!
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Force-Producer-to-fail-when-blocked-by-slow-consumer-tp4710264.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

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