You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by edmallia <ed...@gmail.com> on 2011/07/01 17:35:26 UTC

Producer blocked even after termination of all subscribers

Hi,

I'm using ActiveMQ 5.5.0 communicate over a topic and after I follow the
steps below my producer blocks. 

1. Start two durable subscribers
2. Start producer
3. Start a slow non-durable subscriber
4. Stop the two durable subscriber
5. Wait for the producer to block (and get the log  "Usage Manager memory
limit (1048576) reached for topic...")

I'm assuming that at this point the producer is blocked waiting for the slow
subscriber to catch up (through producer control flow mechanisms).  However,
if I stop the slow non-durable subscriber the producer remains blocked. 
Stopping and restarting the producer has no effect.  

The two ways I've managed to get the producer to start again are to 
1. Either, restart one of the durable subscribers
2. Or, delete the two offline durable subscribers from the ActiveMQ admin
console

Can someone help me figure out what is going on and why the producers
restarts after fiddling around with the durable subscribers?


Thanks

Edward

--
View this message in context: http://activemq.2283324.n4.nabble.com/Producer-blocked-even-after-termination-of-all-subscribers-tp3638518p3638518.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Producer blocked even after termination of all subscribers

Posted by edmallia <ed...@gmail.com>.
Hi Martin,

Thanks for the quick reply.

Your reply got me thinking about my message limits.  My topic memory limit
was set to 1MB :

               <policyEntry topic=">" producerFlowControl="true"
memoryLimit="1mb">

and my system memory usage was set to 800 mb

                <memoryUsage>
                    <memoryUsage limit="800 mb"/>
                </memoryUsage>

I just realised that the 1mb limit was causing the producerFlowControl to
stop my producer as the 1mb is much smaller than the 800mb system limit. 
Does this reasoning hold?

Thanks

Edward


--
View this message in context: http://activemq.2283324.n4.nabble.com/Producer-blocked-even-after-termination-of-all-subscribers-tp3638518p3645475.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Producer blocked even after termination of all subscribers

Posted by "Martin C." <ma...@gmx.at>.
Hi,

I haven't done much work with durable subscriptions yet, but as far as
I understand the topic in connection with producer flow control, it is
guaranteed that no message is lost for any of the persistent
subscriptions. As you have stopped a subscription and once you hit a
configured storage limit, the broker can no longer accept any new
messages in order not to violate the guarantees it provides to the
persistent subscriptions.

So basically you need to ensure that you set the storage limits high
enough to provide enough space for any case one of your persistent
subscribers can be offline, and you also need to make sure you cancel
any persistent subscription that you know that the consumer won't come
back online.

Best regards,
Martin

On Fri, Jul 1, 2011 at 5:35 PM, edmallia <ed...@gmail.com> wrote:
> Hi,
>
> I'm using ActiveMQ 5.5.0 communicate over a topic and after I follow the
> steps below my producer blocks.
>
> 1. Start two durable subscribers
> 2. Start producer
> 3. Start a slow non-durable subscriber
> 4. Stop the two durable subscriber
> 5. Wait for the producer to block (and get the log  "Usage Manager memory
> limit (1048576) reached for topic...")
>
> I'm assuming that at this point the producer is blocked waiting for the slow
> subscriber to catch up (through producer control flow mechanisms).  However,
> if I stop the slow non-durable subscriber the producer remains blocked.
> Stopping and restarting the producer has no effect.
>
> The two ways I've managed to get the producer to start again are to
> 1. Either, restart one of the durable subscribers
> 2. Or, delete the two offline durable subscribers from the ActiveMQ admin
> console
>
> Can someone help me figure out what is going on and why the producers
> restarts after fiddling around with the durable subscribers?
>
>
> Thanks
>
> Edward
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Producer-blocked-even-after-termination-of-all-subscribers-tp3638518p3638518.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>