You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by snicoll <st...@gmail.com> on 2010/06/01 21:23:50 UTC

No redelivery after rollback on a Topic

Hi guys,

I am trying to get redelivery work with a Topic using the latest ActiveMQ
standalone release. I am using 5.3.2 with all the default settings. I have
create a topic with a related DLQ. I also have create a queue and a related
DLQ with a similar config.

My application is using Spring and BTM to have JTA transaction running in
Tomcat. This all works fine both for the receive and the send part. The
delivery mode of my message is persistent (i.e. 2).

When I receive a message on a Topic and I throw an exception, I can see that
the related exception is rolledback. However the message is not redelivered
to me at all. I don't have this behavior with a Queue (the same setup with a
queue works just fine, I have my number of redeliveries as configured on the
CF and the message is put on the DLQ after that).

Any reason why this does not work for a topic?

Thanks
Stéphane
-- 
View this message in context: http://old.nabble.com/No-redelivery-after-rollback-on-a-Topic-tp28746372p28746372.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: No redelivery after rollback on a Topic

Posted by snicoll <st...@gmail.com>.
Hi Gary,


Gary Tully wrote:
> 
> Can you attach your test case to a jira issue? this warrants some
> investigation.
> 

Sure, see https://issues.apache.org/activemq/browse/AMQ-2758

Best,
Stéphane



-- 
View this message in context: http://old.nabble.com/No-redelivery-after-rollback-on-a-Topic-tp28746372p28754730.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: No redelivery after rollback on a Topic

Posted by Gary Tully <ga...@gmail.com>.
Can you attach your test case to a jira issue? this warrants some
investigation.

On 2 June 2010 07:42, snicoll <st...@gmail.com> wrote:

>
> Replying to self.
>
> The problem is related to the cache mode of the
> DefaultMessageListenerContainer. I have the following extra facts:
>
> * With mode = CONSUMER, I just don't get any message at all
> * With mode = SESSION, The rollback works with the configured number of
> redeliveries but the message does not get to the DLQ. I get this instead:
>
>  WARN | Async error occurred: javax.jms.JMSException: Invalid
> acknowledgment: MessageAck {commandId = 17, responseRequired = false,
> ackType = 3, consumerId = ID:llnp186-2141-1275460231570-0:12:1:1,
> firstMessageId = ID:llnp186-2141-1275460231570-0:16:2:1:1, lastMessageId =
> ID:llnp186-2141-1275460231570-0:16:2:1:1, destination =
> topic://topic/topicA, transactionId = null, messageCount = 1}
> javax.jms.JMSException: Invalid acknowledgment: MessageAck {commandId = 17,
> responseRequired = false, ackType = 3, consumerId =
> ID:llnp186-2141-1275460231570-0:12:1:1, firstMessageId =
> ID:llnp186-2141-1275460231570-0:16:2:1:1, lastMessageId =
> ID:llnp186-2141-1275460231570-0:16:2:1:1, destination =
> topic://topic/topicA, transactionId = null, messageCount = 1}
>        at
>
> org.apache.activemq.broker.region.TopicSubscription.acknowledge(TopicSubscription.java:244)
>        at
>
> org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:373)
>        at
>
> org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:470)
>        at
>
> org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
>        at
> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
>        at
> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
>        at
>
> org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
>        at
>
> org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:452)
>        at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
>        at
>
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:300)
>        at
>
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>        at
>
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
>        at
>
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>        at
>
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:216)
>        at
>
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:204)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:186)
>        at java.lang.Thread.run(Thread.java:595)
>
>
>
> Which btw is the exact same message as [1]
>
> Any idea,
> S.
>
> [1] http://old.nabble.com/Topic---DLQ-td28694454.html
> --
> View this message in context:
> http://old.nabble.com/No-redelivery-after-rollback-on-a-Topic-tp28746372p28750698.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: No redelivery after rollback on a Topic

Posted by snicoll <st...@gmail.com>.
Replying to self.

The problem is related to the cache mode of the
DefaultMessageListenerContainer. I have the following extra facts:

* With mode = CONSUMER, I just don't get any message at all
* With mode = SESSION, The rollback works with the configured number of
redeliveries but the message does not get to the DLQ. I get this instead:

 WARN | Async error occurred: javax.jms.JMSException: Invalid
acknowledgment: MessageAck {commandId = 17, responseRequired = false,
ackType = 3, consumerId = ID:llnp186-2141-1275460231570-0:12:1:1,
firstMessageId = ID:llnp186-2141-1275460231570-0:16:2:1:1, lastMessageId =
ID:llnp186-2141-1275460231570-0:16:2:1:1, destination =
topic://topic/topicA, transactionId = null, messageCount = 1}
javax.jms.JMSException: Invalid acknowledgment: MessageAck {commandId = 17,
responseRequired = false, ackType = 3, consumerId =
ID:llnp186-2141-1275460231570-0:12:1:1, firstMessageId =
ID:llnp186-2141-1275460231570-0:16:2:1:1, lastMessageId =
ID:llnp186-2141-1275460231570-0:16:2:1:1, destination =
topic://topic/topicA, transactionId = null, messageCount = 1}
        at
org.apache.activemq.broker.region.TopicSubscription.acknowledge(TopicSubscription.java:244)
        at
org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:373)
        at
org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:470)
        at
org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
        at
org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
        at
org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
        at
org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
        at
org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:452)
        at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:300)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:216)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:204)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:186)
        at java.lang.Thread.run(Thread.java:595)



Which btw is the exact same message as [1]

Any idea,
S.

[1] http://old.nabble.com/Topic---DLQ-td28694454.html
-- 
View this message in context: http://old.nabble.com/No-redelivery-after-rollback-on-a-Topic-tp28746372p28750698.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.