Based on Tim Bish's comments in http://activemq.2283324.n4.nabble.com/How-to-use-INDIVIDUAL-ACKNOWLEDGE-mode-td4704793.html, I believe it's not possible to do what you want. If you want to be able to in a future version, vote for https://issues.apache.org/jira/browse/AMQ-6098 . On Nov 12, 2015 10:19 AM, "calugaru.cristi" <calugaru.cri...@gmail.com> wrote:
> Hi, > > I have a use case where I have to use a non-transactional activemq broker, > configured with ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE. > > The broker is started and run locally, for a unit test, and it is > configured > with persistence disabled, but with a sharedDeadLetterStrategy with > processNonPersistent set to true. > > What I want is to be able to programmatically send a poison ack to the > broker, and expect that the message will be delivered automatically to the > DLQ queue: > > MessageAck messageAck = new MessageAck(activeMQMessage, > MessageAck.POSION_ACK_TYPE, 1); > messageAck.setPoisonCause(new Throwable("Message " + msgId + "failed")); > try { > activeMQSession.asyncSendPacket(messageAck); > } catch (JMSException e) { > LOG.error("Error sending back the poison ack", e); > } > > Given my current setup , do i need to change something to get this to work? > (Did not manage to do it from within a unit test - messages do not get > "moved" to DLQ once I send the poison ack). > > Thanks, > Cristian > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Non-Transactional-Individual-poison-acking-messages-tp4703912.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >