Vadim
Vadim

Reputation: 521

Migration from ActiveMQ Classic 5.15.9 to ActiveMQ Artemis 2.17.0

Given simple configuration:

It works fine as long as we're using ActiveMQ 5.15.9. But it does not work with Artemis. In Artemis GUI I can see, that OPENWIRE protocol uses multicast queue with the name VirtualTopic.Some.Topic.Name and consumer with STOMP protocol uses multicast queue with the name /topic/VirtualTopic.Some.Topic.Name. And when Client1 (producer) sends a message, I can see this DEBUG log entry:

2022-02-17 09:57:36,642 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Couldn't find any bindings for address=VirtualTopic.Some.Topic.Name on message=CoreMessage[messageID=12884902991,durable=true,userID=a71cfe57-8fcf-11ec-8d24-e470b8b47a8a,priority=4, timestamp=Thu Feb 17 09:57:36 CET 2022,expiration=0, durable=true, address=VirtualTopic.Some.Topic.Name,size=1259,properties=TypedProperties[__AMQ_CID=ID:D118010-54523-637806885913733333-0:0,_AMQ_GROUP_SEQUENCE=0,__HDR_BROKER_IN_TIME=1645088256634,_AMQ_ROUTING_TYPE=0,__HDR_ARRIVAL=0,__HDR_COMMAND_ID=9,__HDR_PRODUCER_ID=[0000 003B 7B01 0027 4944 3A44 3131 3830 3130 2D35 3435 3233 2D36 3337 3830  ... 35 3931 3337 3333 3333 332D 313A 3000 0000 0000 0000 0100 0000 0000 0000 01),__HDR_MESSAGE_ID=[0000 004E 6E00 017B 0100 2749 443A 4431 3138 3031 302D 3534 3532 332D 3633  ...  0000 0000 0001 0000 0000 0000 0001 0000 0000 0000 0001 0000 0000 0000 0000),__HDR_DROPPABLE=false]]@7144975
2022-02-17 09:57:36,643 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Message CoreMessage[messageID=12884902991,durable=true,userID=a71cfe57-8fcf-11ec-8d24-e470b8b47a8a,priority=4, timestamp=Thu Feb 17 09:57:36 CET 2022,expiration=0, durable=true, address=VirtualTopic.Some.Topic.Name,size=1259,properties=TypedProperties[__AMQ_CID=ID:D118010-54523-637806885913733333-0:0,_AMQ_GROUP_SEQUENCE=0,__HDR_BROKER_IN_TIME=1645088256634,_AMQ_ROUTING_TYPE=0,__HDR_ARRIVAL=0,__HDR_COMMAND_ID=9,__HDR_PRODUCER_ID=[0000 003B 7B01 0027 4944 3A44 3131 3830 3130 2D35 3435 3233 2D36 3337 3830  ... 35 3931 3337 3333 3333 332D 313A 3000 0000 0000 0000 0100 0000 0000 0000 01),__HDR_MESSAGE_ID=[0000 004E 6E00 017B 0100 2749 443A 4431 3138 3031 302D 3534 3532 332D 3633  ...  0000 0000 0001 0000 0000 0000 0001 0000 0000 0000 0001 0000 0000 0000 0000),__HDR_DROPPABLE=false]]@7144975 is not going anywhere as it didn't have a binding on address:VirtualTopic.Some.Topic.Name

Our use-case is that we have one backend server that sends events via ActiveMQ and X consumers. The decision to use virtual topics was made by another team. I do not really know, the way they consume events. On my side, I have a simulator, that consumes events and fakes that sub-system.

Is it possible to make Artemis work when clients are using different protocols?

Upvotes: 0

Views: 749

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 34973

I see you're using the /topic/ prefix for your STOMP consumer. I recommend you configure the appropriate anycastPrefix and multicastPrefix settings on the acceptor which the STOMP client is using. These settings control the semantics used by the broker when auto-creating addresses & queues and when routing messages. For example:

<acceptor name="stomp">tcp://0.0.0.0:61613?protocols=STOMP;useEpoll=true;anycastPrefix=/queue/;multicastPrefix=/topic/</acceptor>

See the documentation for more details.

The DEBUG messages you're seeing are expected when a message is sent to a multicast address and there are no queues bound to that address as is the case when a JMS client sends a message to a JMS topic and there are no JMS subscribers. I think you can safely ignore those messages.

Lastly, I recommend you move to ActiveMQ Artemis 2.20.0. There's been over 300 Jiras resolved between 2.17.0 and 2.20.0.

Upvotes: 2

Related Questions