You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jiunjiunma <ji...@gmail.com> on 2012/11/12 19:21:21 UTC

Will messages in DLQ be store-forwarded in network-of-broker setting?

I had a small test case that cleans up the ActiveMQ DLQ. It works fine when I
am running a single broker. When I ran a network of brokers (2 static
brokers using per queue based DLQ setting), I noticed the client code (with
uri=failover://(tcp://localhost:61616,tcp://localhost:61618)?randomize=true)
only remove the messages from the instance DLQ it connected to. It seems the
client consumer was only able to access the DQL the activemq instance is
current connected to and if the message happened to be on the other broker
then it was not able to be deleted.

It was a bit surprise to me because I would expect the DLQ should be behaved
the same as the normal queues and messages should be processed by the
consumer regardless of the broker it connected to. Is this the expected
behavior? Or my understanding was wrong that the DLQ messages will not be
store-and-forwarded to the other brokers?

I'd appreciate it if anybody can shed some light on it.

Thanks,
--Jiunjiun



--
View this message in context: http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Will messages in DLQ be store-forwarded in network-of-broker setting?

Posted by Gary Tully <ga...@gmail.com>.
element name is: networkBridgeFilterFactory, value
conditionalNetworkBridgeFilterFactory

On 12 November 2012 21:23, jiunjiunma <ji...@gmail.com> wrote:
> I am using JMS connection pool and concurrent consumers (with the
> randomize=true setting in failover uri). I am not sure if it will cause the
> "consumer bounces between brokers" scenario you described. If so, does that
> means my other messages may also be stuck on a broker?
>
> I tried to use the following option in the activemq.xml setting as the
> activemq site suggested (
> http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29
> <http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29>
> ) but activemq had problem even load it (I am using activemq 5.7):
>
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
> content was found starting with element
> 'conditionalNetworkBridgeFilterFactory'. One of
> '{"http://activemq.apache.org/schema/core":deadLetterStrategy,
> "http://activemq.apache.org/schema/core":destination,
> "http://activemq.apache.org/schema/core":dispatchPolicy,
> "http://activemq.apache.org/schema/core":messageEvictionStrategy,
> "http://activemq.apache.org/schema/core":messageGroupMapFactory,
> "http://activemq.apache.org/schema/core":networkBridgeFilterFactory,
> "http://activemq.apache.org/schema/core":pendingDurableSubscriberPolicy,
> "http://activemq.apache.org/schema/core":pendingMessageLimitStrategy,
> "http://activemq.apache.org/schema/core":pendingQueuePolicy,
> "http://activemq.apache.org/schema/core":pendingSubscriberPolicy,
> "http://activemq.apache.org/schema/core":slowConsumerStrategy,
> "http://activemq.apache.org/schema/core":subscriptionRecoveryPolicy,
> WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
>
>
> gtully wrote
>> the dlq should behave like any other queue w.r.t a network.
>> One thing to note however, it that a message will only be bridged
>> once, so if a message is forwarded from A->B it won't by default get
>> forwarded back from B->A.
>>
>> I wonder if that is is occurring in your scenario. It could be if your
>> consumer bounces between brokers, because it will create demand and
>> suck messages across the bridge even if it does not consume them all.
>>
>> some more detail at:
>> http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29
>>
>>
>> On 12 November 2012 18:21, jiunjiunma &lt;
>
>> jiunjiunma@
>
>> &gt; wrote:
>>> I had a small test case that cleans up the ActiveMQ DLQ. It works fine
>>> when I
>>> am running a single broker. When I ran a network of brokers (2 static
>>> brokers using per queue based DLQ setting), I noticed the client code
>>> (with
>>> uri=failover://(tcp://localhost:61616,tcp://localhost:61618)?randomize=true)
>>> only remove the messages from the instance DLQ it connected to. It seems
>>> the
>>> client consumer was only able to access the DQL the activemq instance is
>>> current connected to and if the message happened to be on the other
>>> broker
>>> then it was not able to be deleted.
>>>
>>> It was a bit surprise to me because I would expect the DLQ should be
>>> behaved
>>> the same as the normal queues and messages should be processed by the
>>> consumer regardless of the broker it connected to. Is this the expected
>>> behavior? Or my understanding was wrong that the DLQ messages will not be
>>> store-and-forwarded to the other brokers?
>>>
>>> I'd appreciate it if anybody can shed some light on it.
>>>
>>> Thanks,
>>> --Jiunjiun
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> http://redhat.com
>> http://blog.garytully.com
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196p4659212.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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

Re: Will messages in DLQ be store-forwarded in network-of-broker setting?

Posted by jiunjiunma <ji...@gmail.com>.
I am using JMS connection pool and concurrent consumers (with the
randomize=true setting in failover uri). I am not sure if it will cause the
"consumer bounces between brokers" scenario you described. If so, does that
means my other messages may also be stuck on a broker?

I tried to use the following option in the activemq.xml setting as the
activemq site suggested (
http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29
<http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29> 
) but activemq had problem even load it (I am using activemq 5.7):

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element
'conditionalNetworkBridgeFilterFactory'. One of
'{"http://activemq.apache.org/schema/core":deadLetterStrategy,
"http://activemq.apache.org/schema/core":destination,
"http://activemq.apache.org/schema/core":dispatchPolicy,
"http://activemq.apache.org/schema/core":messageEvictionStrategy,
"http://activemq.apache.org/schema/core":messageGroupMapFactory,
"http://activemq.apache.org/schema/core":networkBridgeFilterFactory,
"http://activemq.apache.org/schema/core":pendingDurableSubscriberPolicy,
"http://activemq.apache.org/schema/core":pendingMessageLimitStrategy,
"http://activemq.apache.org/schema/core":pendingQueuePolicy,
"http://activemq.apache.org/schema/core":pendingSubscriberPolicy,
"http://activemq.apache.org/schema/core":slowConsumerStrategy,
"http://activemq.apache.org/schema/core":subscriptionRecoveryPolicy,
WC[##other:"http://activemq.apache.org/schema/core"]}' is expected. 


gtully wrote
> the dlq should behave like any other queue w.r.t a network.
> One thing to note however, it that a message will only be bridged
> once, so if a message is forwarded from A->B it won't by default get
> forwarded back from B->A.
> 
> I wonder if that is is occurring in your scenario. It could be if your
> consumer bounces between brokers, because it will create demand and
> suck messages across the bridge even if it does not consume them all.
> 
> some more detail at:
> http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29
> 
> 
> On 12 November 2012 18:21, jiunjiunma &lt;

> jiunjiunma@

> &gt; wrote:
>> I had a small test case that cleans up the ActiveMQ DLQ. It works fine
>> when I
>> am running a single broker. When I ran a network of brokers (2 static
>> brokers using per queue based DLQ setting), I noticed the client code
>> (with
>> uri=failover://(tcp://localhost:61616,tcp://localhost:61618)?randomize=true)
>> only remove the messages from the instance DLQ it connected to. It seems
>> the
>> client consumer was only able to access the DQL the activemq instance is
>> current connected to and if the message happened to be on the other
>> broker
>> then it was not able to be deleted.
>>
>> It was a bit surprise to me because I would expect the DLQ should be
>> behaved
>> the same as the normal queues and messages should be processed by the
>> consumer regardless of the broker it connected to. Is this the expected
>> behavior? Or my understanding was wrong that the DLQ messages will not be
>> store-and-forwarded to the other brokers?
>>
>> I'd appreciate it if anybody can shed some light on it.
>>
>> Thanks,
>> --Jiunjiun
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> http://redhat.com
> http://blog.garytully.com





--
View this message in context: http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196p4659212.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Will messages in DLQ be store-forwarded in network-of-broker setting?

Posted by Gary Tully <ga...@gmail.com>.
the dlq should behave like any other queue w.r.t a network.
One thing to note however, it that a message will only be bridged
once, so if a message is forwarded from A->B it won't by default get
forwarded back from B->A.

I wonder if that is is occurring in your scenario. It could be if your
consumer bounces between brokers, because it will create demand and
suck messages across the bridge even if it does not consume them all.

some more detail at:
http://activemq.apache.org/networks-of-brokers.html#NetworksofBrokers-StuckMessages%28version5.6%29


On 12 November 2012 18:21, jiunjiunma <ji...@gmail.com> wrote:
> I had a small test case that cleans up the ActiveMQ DLQ. It works fine when I
> am running a single broker. When I ran a network of brokers (2 static
> brokers using per queue based DLQ setting), I noticed the client code (with
> uri=failover://(tcp://localhost:61616,tcp://localhost:61618)?randomize=true)
> only remove the messages from the instance DLQ it connected to. It seems the
> client consumer was only able to access the DQL the activemq instance is
> current connected to and if the message happened to be on the other broker
> then it was not able to be deleted.
>
> It was a bit surprise to me because I would expect the DLQ should be behaved
> the same as the normal queues and messages should be processed by the
> consumer regardless of the broker it connected to. Is this the expected
> behavior? Or my understanding was wrong that the DLQ messages will not be
> store-and-forwarded to the other brokers?
>
> I'd appreciate it if anybody can shed some light on it.
>
> Thanks,
> --Jiunjiun
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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

Re: Will messages in DLQ be store-forwarded in network-of-broker setting?

Posted by jiunjiunma <ji...@gmail.com>.
Sure. I am using the sample configurations bundled with activemq 5.7. They
are the same as activemq-static-network-broker1.xml and
activemq-static-network-broker2.xml. I commented out the deadLetterStrategy
section but they behave the same whether it's per queue DLQ or in shared DLQ
setting.


activemq-static-network-broker1.xml
<http://activemq.2283324.n4.nabble.com/file/n4659203/activemq-static-network-broker1.xml>  

//broker2
activemq-static-network-broker2.xml
<http://activemq.2283324.n4.nabble.com/file/n4659203/activemq-static-network-broker2.xml>  


ceposta wrote
> Can you post your network connector configuration?
> 
> On Mon, Nov 12, 2012 at 11:21 AM, jiunjiunma &lt;

> jiunjiunma@

> &gt; wrote:
> 
>> I had a small test case that cleans up the ActiveMQ DLQ. It works fine
>> when I
>> am running a single broker. When I ran a network of brokers (2 static
>> brokers using per queue based DLQ setting), I noticed the client code
>> (with
>>
>> uri=failover://(tcp://localhost:61616,tcp://localhost:61618)?randomize=true)
>> only remove the messages from the instance DLQ it connected to. It seems
>> the
>> client consumer was only able to access the DQL the activemq instance is
>> current connected to and if the message happened to be on the other
>> broker
>> then it was not able to be deleted.
>>
>> It was a bit surprise to me because I would expect the DLQ should be
>> behaved
>> the same as the normal queues and messages should be processed by the
>> consumer regardless of the broker it connected to. Is this the expected
>> behavior? Or my understanding was wrong that the DLQ messages will not be
>> store-and-forwarded to the other brokers?
>>
>> I'd appreciate it if anybody can shed some light on it.
>>
>> Thanks,
>> --Jiunjiun
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta





--
View this message in context: http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196p4659203.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Will messages in DLQ be store-forwarded in network-of-broker setting?

Posted by Christian Posta <ch...@gmail.com>.
Can you post your network connector configuration?

On Mon, Nov 12, 2012 at 11:21 AM, jiunjiunma <ji...@gmail.com> wrote:

> I had a small test case that cleans up the ActiveMQ DLQ. It works fine
> when I
> am running a single broker. When I ran a network of brokers (2 static
> brokers using per queue based DLQ setting), I noticed the client code (with
>
> uri=failover://(tcp://localhost:61616,tcp://localhost:61618)?randomize=true)
> only remove the messages from the instance DLQ it connected to. It seems
> the
> client consumer was only able to access the DQL the activemq instance is
> current connected to and if the message happened to be on the other broker
> then it was not able to be deleted.
>
> It was a bit surprise to me because I would expect the DLQ should be
> behaved
> the same as the normal queues and messages should be processed by the
> consumer regardless of the broker it connected to. Is this the expected
> behavior? Or my understanding was wrong that the DLQ messages will not be
> store-and-forwarded to the other brokers?
>
> I'd appreciate it if anybody can shed some light on it.
>
> Thanks,
> --Jiunjiun
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Will-messages-in-DLQ-be-store-forwarded-in-network-of-broker-setting-tp4659196.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta