You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Florea Cosmin <fo...@gmail.com> on 2021/03/03 09:56:36 UTC

Artemis and ActiveMQ 5.x advisory messages

Hello,

I have a C++ client connected to ActiveMQ 5.15. The client has a 
consumer for ActiveMQ.Advisory.Consumer.Topic.A. I want to use the same 
client code with Artemis, but Artemis doesn't send the same Advisory 
messages. Is it possible to reuse the client with Artemis without code 
changes?


Thank you.

Re: Artemis and ActiveMQ 5.x advisory messages

Posted by Gary Tully <ga...@gmail.com>.
This may also be an approach that can work for you, using diverts of
the management notifications and redirecting to the advisory topic
address,
it may not be easy to dynamically change the address but it could work
if the addresses in play are constrained.

see: org.apache.activemq.artemis.tests.integration.divert.DivertTest#testDivertedNotificationMessagePropertiesOpenWire

https://github.com/apache/activemq-artemis/blob/master/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java#L68

On Wed, 3 Mar 2021 at 12:55, Gary Tully <ga...@gmail.com> wrote:
>
> not at the moment. There are a subset of advisory messages produced,
> but those are around temp destination creation.
> ideally the full set of advisories would be implemented via a broker plugin.
>
> https://activemq.apache.org/components/artemis/documentation/latest/broker-plugins.html
>
> for the consumer advisories, like you need, implementing:
> org.apache.activemq.artemis.core.server.plugin.ActiveMQServerConsumerPlugin#afterCreateConsumer
> and getting a handle on the openwire protocol manager to call
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager#fireAdvisory(org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext,
> org.apache.activemq.command.ActiveMQTopic,
> org.apache.activemq.command.Command,
> org.apache.activemq.command.ConsumerId, java.lang.String)
>
> it may be initially tricky to wire it up, but I think it would be doable.
>
> On Wed, 3 Mar 2021 at 09:56, Florea Cosmin <fo...@gmail.com> wrote:
> >
> > Hello,
> >
> > I have a C++ client connected to ActiveMQ 5.15. The client has a
> > consumer for ActiveMQ.Advisory.Consumer.Topic.A. I want to use the same
> > client code with Artemis, but Artemis doesn't send the same Advisory
> > messages. Is it possible to reuse the client with Artemis without code
> > changes?
> >
> >
> > Thank you.

Re: Artemis and ActiveMQ 5.x advisory messages

Posted by Gary Tully <ga...@gmail.com>.
not at the moment. There are a subset of advisory messages produced,
but those are around temp destination creation.
ideally the full set of advisories would be implemented via a broker plugin.

https://activemq.apache.org/components/artemis/documentation/latest/broker-plugins.html

for the consumer advisories, like you need, implementing:
org.apache.activemq.artemis.core.server.plugin.ActiveMQServerConsumerPlugin#afterCreateConsumer
and getting a handle on the openwire protocol manager to call
org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager#fireAdvisory(org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext,
org.apache.activemq.command.ActiveMQTopic,
org.apache.activemq.command.Command,
org.apache.activemq.command.ConsumerId, java.lang.String)

it may be initially tricky to wire it up, but I think it would be doable.

On Wed, 3 Mar 2021 at 09:56, Florea Cosmin <fo...@gmail.com> wrote:
>
> Hello,
>
> I have a C++ client connected to ActiveMQ 5.15. The client has a
> consumer for ActiveMQ.Advisory.Consumer.Topic.A. I want to use the same
> client code with Artemis, but Artemis doesn't send the same Advisory
> messages. Is it possible to reuse the client with Artemis without code
> changes?
>
>
> Thank you.