You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SuoNayi <su...@163.com> on 2011/09/15 16:10:16 UTC

How to avoid the starvation of consumer when using network broker?

I have two brokers A and B, they are networked bi-directionally.

One producer on broker A sent a message to A,because broker A didnot have consumer so broker A forwarded the message to broker B(assuming there is one consumer on broker B).

Before the consumer began to consume the message, it died and failover to broker A.

Because broker B will not forward the message to the consumer on broker A. So the message will not be consumed.

So how to avoid this issue?

Re: How to avoid the starvation of consumer when using network broker?

Posted by Gary Tully <ga...@gmail.com>.
You can use a connection pool and have it expire connections, so that
they get closed and rebalanced by failover or you can have a peek at
the new relay policy in 5.6.

https://issues.apache.org/jira/browse/AMQ-2324?focusedCommentId=13059430&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13059430

try it out in a current 5.6-SNAPSHOT

2011/9/15 SuoNayi <su...@163.com>:
> I have two brokers A and B, they are networked bi-directionally.
>
> One producer on broker A sent a message to A,because broker A didnot have consumer so broker A forwarded the message to broker B(assuming there is one consumer on broker B).
>
> Before the consumer began to consume the message, it died and failover to broker A.
>
> Because broker B will not forward the message to the consumer on broker A. So the message will not be consumed.
>
> So how to avoid this issue?



-- 
http://fusesource.com
http://blog.garytully.com