You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nader <na...@salas.dk> on 2014/04/30 10:24:23 UTC

'Advisory' messages do not forward on staticallyIncludedDestinations

Hi

I have two brokers, A and B on 5.9.1.
Messages send to broker A is forwarded statically to broker B, defined by
keyword staticallyIncludedDestinations in activemq.xml, and advisorySupport
is also disabled.
Below is the configuration snippet. 
...
<networkConnector 
   name="BrokerA.CH"
   userName="user"
   password="pass"
   staticBridge="true"
   uri="static:(tcp://BrokerB:61616)" networkTTL="3">
   <staticallyIncludedDestinations> <queue physicalName="Q1"/>
</staticallyIncludedDestinations>
</networkConnector>
...

I am implementing a heartbeat message with the queue's statistics (brokerA)
to the other end (brokerB).

Every messages get through, but messages with jmsType of 'Advisory' do not
forwarded.

Is it by design or a bug?

Can I change this behavior?

Thanks in advance.

Nader





 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by artnaseef <ar...@artnaseef.com>.
Ah, I see - thank you for the clarification.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4681115.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by nader <na...@salas.dk>.
Thanks Felix, that did the trick.

@artnaseef
I just want to extract the queue statistics and forwarded through the static
bridged network.
As the created message gets JMSType of 'Advisory' (do not know why) broker
did not let the message to pass through.
Advisories are disabled in my system and I do not want to replay messages
back to the broker.
Just definding <conditionalNetworkBridgeFilterFactory /> as Tully suggested
solved the problem.

R/Nader





--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4681037.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by artnaseef <ar...@artnaseef.com>.
Can you give some detail to the problem?

Advisory topics have a very specific usage in the brokers, especially with a
network-of-brokers.  Would it be possible to acheive the goal with a regular
Topic instead of an advisory one?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4681000.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by felixehm <Fe...@cern.ch>.
Hi,

<destinationPolicy>
  <policyMap>
    <policyEntries>
      <policyEntry  ...>
              <networkBridgeFilterFactory>
                    <conditionalNetworkBridgeFilterFactory ... />
              </networkBridgeFilterFactory>

....


Cheers,
Felix



--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4680997.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by nader <na...@salas.dk>.
thanks, but I get 

INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@e553e814:
startup date [Thu May 08 14:20:33 CEST 2014]; root of context hierarchy
ERROR | Failed to load: class path resource [activemq.xml], reason: Line 44
in XML document from class path resource [activemq.xml] is invalid; nested
exception is 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.

My configurations is:
<policyEntry queue=">">
    <conditionalNetworkBridgeFilterFactory />    
</policyEntry>







--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4680995.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by Gary Tully <ga...@gmail.com>.
even if statically configured, there are still subscriptions in the
mix. If you apply that policy to add topics using a wildcard it should
get picked up.


On 4 May 2014 16:16, nader <na...@salas.dk> wrote:
> Thanks for quick answer and sorry for my late response.
>
> I am really not sure if I understand the solution you are providing here.
>
> How can I permit forward 'Advisory' messages using
> <conditionalNetworkBridgeFilterFactory />?
> Would you please give an example?
>
> In my network, consumers do not use subscription, as all routes are defined
> statically and topics are
> defined as composite destinations. All producers and consumers are known and
> online at all times.
>
> Because of this restriction, I have to request statistics from a queue
> (using STOMP) to an intermediate queue and retrieve the message from there
> and send it (the message get another jmsType) back to original queue in
> which it gets forwarded to another broker.
>
> R/Nader
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4680838.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by nader <na...@salas.dk>.
Thanks for quick answer and sorry for my late response.

I am really not sure if I understand the solution you are providing here.

How can I permit forward 'Advisory' messages using
<conditionalNetworkBridgeFilterFactory />?
Would you please give an example?

In my network, consumers do not use subscription, as all routes are defined
statically and topics are 
defined as composite destinations. All producers and consumers are known and
online at all times.

Because of this restriction, I have to request statistics from a queue
(using STOMP) to an intermediate queue and retrieve the message from there
and send it (the message get another jmsType) back to original queue in
which it gets forwarded to another broker.

R/Nader




--
View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733p4680838.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: 'Advisory' messages do not forward on staticallyIncludedDestinations

Posted by Gary Tully <ga...@gmail.com>.
That is intentional because the network bridge will intercept and
react to certain advisory messages, but that decision went before the
use of the advisory type for the statistics broker. I guess the
statistics broker could use a different 'type'

This behaviour is implemented in a subscription filter[1] and that is
configurable via a factory entry on the destination policy

I think you are in luck because we ship one variation of that filter
that does not include that check.

<policyEntry ...>
     <conditionalNetworkBridgeFilterFactory />
 </policyEntry>

So long as the advisory messages are not consumer/destination
advisories  (which the stats messages are not) you will be ok.
Failing that you can implement your own filter factory and wire it in
with a bean reference.

[1] https://github.com/apache/activemq/blob/20f384ce59b758a0f3c1b0e0620e2efd58ca230a/activemq-client/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java#L99


On 30 April 2014 09:24, nader <na...@salas.dk> wrote:
> Hi
>
> I have two brokers, A and B on 5.9.1.
> Messages send to broker A is forwarded statically to broker B, defined by
> keyword staticallyIncludedDestinations in activemq.xml, and advisorySupport
> is also disabled.
> Below is the configuration snippet.
> ...
> <networkConnector
>    name="BrokerA.CH"
>    userName="user"
>    password="pass"
>    staticBridge="true"
>    uri="static:(tcp://BrokerB:61616)" networkTTL="3">
>    <staticallyIncludedDestinations> <queue physicalName="Q1"/>
> </staticallyIncludedDestinations>
> </networkConnector>
> ...
>
> I am implementing a heartbeat message with the queue's statistics (brokerA)
> to the other end (brokerB).
>
> Every messages get through, but messages with jmsType of 'Advisory' do not
> forwarded.
>
> Is it by design or a bug?
>
> Can I change this behavior?
>
> Thanks in advance.
>
> Nader
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Advisory-messages-do-not-forward-on-staticallyIncludedDestinations-tp4680733.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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