Whatever Groovy code you pasted didn't make it through so it's hard to say specifically what you're doing wrong. However, in general you should create the session with autoCommitAcks = false, then ack the message, and lastly rollback the session.
Here's an example from the Artemis test-suite [1]. Justin [1] https://github.com/apache/activemq-artemis/blob/master/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java#L59 On Thu, Jun 6, 2019 at 7:01 AM Bummer <jen...@centrum.cz> wrote: > Hello. > > How do I make my message end up in DLQ while using the Core protocol? > > My code in Groovy: > > > The assertion should be true, as the message is supposed to end up in the > default DLQ after 10 receive attempts as per [1]. But even on a freshly > spawned Artemis 2.8.1 instance this does not work. > > I also tried to run the 'dead-letter' example which uses JMS and it worked > just fine. > > Any ideas? > > [1] > > https://activemq.apache.org/components/artemis/documentation/latest/undelivered-messages.html > > > > -- > Sent from: > http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html >