0

I have 2 modules that communicate through an Artemis 2.17.0 active/passive cluster:

  • one legacy with the listener (the one that gets the warn message) where there is an OpenWire JMS library from ActiveMQ "Classic"
  • the other is a Spring Boot 3 application with the producer that uses the artemis-jakarta-client (is the only difference with Spring Boot 2.7 that uses artemis-jms-client)

Then since I've moved to Spring Boot 3 the messages keep going in DLQ. Only the first message after the application startup succeed to be consumed.

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
  • What version of ActiveMQ Artemis are you using? Can you provide any more details about why the legacy listener is failing with "suppressing duplicate delivery on connection"? How do you know it's _not_ receiving duplicate deliveries? What have you tried to resolve the issue? – Justin Bertram Mar 07 '23 at 17:44
  • I use Artemis 2.17.0, I'm sure that the message isn't duplicate, because no message is consumed and only one message is in the DLQ – daniele andreoli Mar 08 '23 at 09:24

2 Answers2

0

The OpenWire JMS client you're using in your legacy listener (i.e. the one that gets the warning) performs duplicate detection by default. This is configured via the checkForDuplicates URL parameter (defaults to true). If you think it is incorrectly identifying duplicates then you can set checkForDuplicates=false on the application's connection URL.

At this point I don't see how switching the producer application from Spring Boot 2.7 to 3 would impact the consumer application and trigger this warning. It may just be a coincidence.

That said, there may be a bug in 2.17.0 that's triggering this. In any event I strongly encourage you to upgrade to the latest release which is 2.28.0 which means you're over 10 releases behind at this point.

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
  • No unfortunately this cannot be done, we have an Artemis clustered, if we switch off the check for duplicates we can have problems – daniele andreoli Mar 09 '23 at 09:09
  • See this answer; it says that ActiveMQ does not currently support the jakarta client: https://stackoverflow.com/questions/75523360/activemq-5-17-0-and-spring-jms-6-0-4-is-not-working/75523683#75523683 The referenced JIRA is marked as resolved in 5.18. – Gary Russell Mar 09 '23 at 14:38
  • The way I read the question his legacy application using the OpenWire JMS client is _not_ using Spring Boot 3 and therefore does not need any kind of Jakarta-specific integration so I'm not sure if that answer is relevant. The producer application using Spring Boot 3 w/Jakarta should be able to send messages and the legacy app using OpenWire JMS (non Jakarta) should be able to consume them. – Justin Bertram Mar 09 '23 at 16:01
0

At the end the only solution that worked was to use a factoryConnection on the consumer with the CORE protocol. I switched to artemis-jms-client library and everything worked fine.