You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Allesmallachen <Sp...@web.de> on 2007/03/27 21:02:25 UTC
BrokerFilter question
Hi,
I am trying to implement a custom BrokerFilter.
If the addConsumer method is called a special message should be send to all
peer brokers.
Is there a way to directly send a Command or Message subclass to a peer
broker from within a BrokerFilter???
The AdvisoryBroker seems to publish Messages to the Advisory topics.
Advisory topics have connections to peer brokers and this is how messages
travel from AdvisoryBroker to peer brokers.
This feels a little bit awkward for pure broker-to-broker communication.
Is there no direct way to exchange messages between brokers?
best regards,
Christian
--
View this message in context: http://www.nabble.com/BrokerFilter-question-tf3474965s2354.html#a9698934
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: BrokerFilter question
Posted by James Strachan <ja...@gmail.com>.
It might be easier for you to just use a JMS client. But if not you
could use ConnectionInfo, ProducerInfo and MessageDispatch to send a
message.
On 3/31/07, Allesmallachen <Sp...@web.de> wrote:
>
> Hi,
> thank you for yours answer James. Basically, I just want to send a message
> to the broker that forwareded a new consumerInfo to another broker
> (something like an acknowledgement between brokers).
> I can distinguish a ConsumerInfo that was send to a broker from a local
> client from one that was forwarded by a peer broker (in a network of
> brokers) in the addConsumer method of a BrokerFilter by inspecting the
> broker path in the ConsumerInfo.
>
> What I don't know is how to send a message back to the forwarding broker.
> I've tried to use the ConnectionContext in the addConsumer method but it
> seems that it does not reach the remote broker. The message I want to send
> back is a MessageDispatch command.
> Any help is appreciated.
> Best regards,
> Christian
>
> --
> View this message in context: http://www.nabble.com/BrokerFilter-question-tf3474965s2354.html#a9770183
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/
Re: BrokerFilter question
Posted by Allesmallachen <Sp...@web.de>.
Hi,
thank you for yours answer James. Basically, I just want to send a message
to the broker that forwareded a new consumerInfo to another broker
(something like an acknowledgement between brokers).
I can distinguish a ConsumerInfo that was send to a broker from a local
client from one that was forwarded by a peer broker (in a network of
brokers) in the addConsumer method of a BrokerFilter by inspecting the
broker path in the ConsumerInfo.
What I don't know is how to send a message back to the forwarding broker.
I've tried to use the ConnectionContext in the addConsumer method but it
seems that it does not reach the remote broker. The message I want to send
back is a MessageDispatch command.
Any help is appreciated.
Best regards,
Christian
--
View this message in context: http://www.nabble.com/BrokerFilter-question-tf3474965s2354.html#a9770183
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: BrokerFilter question
Posted by James Strachan <ja...@gmail.com>.
On 3/27/07, Allesmallachen <Sp...@web.de> wrote:
>
> Hi,
> I am trying to implement a custom BrokerFilter.
> If the addConsumer method is called a special message should be send to all
> peer brokers.
> Is there a way to directly send a Command or Message subclass to a peer
> broker from within a BrokerFilter???
>
> The AdvisoryBroker seems to publish Messages to the Advisory topics.
> Advisory topics have connections to peer brokers and this is how messages
> travel from AdvisoryBroker to peer brokers.
> This feels a little bit awkward for pure broker-to-broker communication.
> Is there no direct way to exchange messages between brokers?
It depends on what you're doing. You could look at extending the
NetworkConnectors which deal with broker-broker communication.
BrokerFilter is really used as an interceptor to process in/out bound
commands to a single broker
--
James
-------
http://radio.weblogs.com/0112098/