activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuoNayi <suonayi2...@163.com>
Subject Re:XA transaction not working on Broker redelivery.
Date Mon, 15 Apr 2013 14:43:57 GMT
Broker redelivery function uses scheduler to redeliver messages.
B/w scheduled messages are out of any transactions so you will see the repsonse messages even
if rollback is performed. 




At 2013-04-15 22:11:09,guillaume.surrel@orange.com wrote:
>Hello,
>
>I'm having some troubles using redelivery plugin and XA transactions. I'm using a spring
listener-container and JtaTransactionManager in an application server. I'm using ActiveMQ
5.8.0.
>
>When the listener receives the message, we write it into a database and send a response
message during the transaction. In order to test the rollback of the transaction, we throw
an exception before the end of transaction.
>
>When using client redelivery (jms.redeliveryPolicy.maximumRedeliveries=3), everything
works as expected: the response message is not sent and the message is not persisted.
>
>But when using broker redelivery plugin, the behavior is different. After the redelivery
delay, the message is sent again but the XA is not working anymore on the messaging side:
the response message is sent anyway. So after sending 1 message,  I end up with 1 message
in my dead letter queue (expected), an empty database (expected), and various duplicate message
responses (should be 0).
>
>This is my configuration of the redelivery plugin :
><plugins>
>   <redeliveryPlugin fallbackToDeadLetter="true" sendToDlqIfMaxRetriesExceeded="true">
>     <redeliveryPolicyMap>
>       <redeliveryPolicyMap>
>         <defaultEntry>
>           <redeliveryPolicy maximumRedeliveries="6" redeliveryDelay="10000" />
>         </defaultEntry>
>       </redeliveryPolicyMap>
>     </redeliveryPolicyMap>
>   </redeliveryPlugin>
></plugins>
>
>Has anyone experienced similar problems ? Am I missing something about broker redelivery
?
>
>Thank you,
>Guillaume
>
>_________________________________________________________________________________________________________________________
>
>Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou
privilegiees et ne doivent donc
>pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message
par erreur, veuillez le signaler
>a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques
etant susceptibles d'alteration,
>France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme
ou falsifie. Merci.
>
>This message and its attachments may contain confidential or privileged information that
may be protected by law;
>they should not be distributed, used or copied without authorisation.
>If you have received this email in error, please notify the sender and delete this message
and its attachments.
>As emails may be altered, France Telecom - Orange is not liable for messages that have
been modified, changed or falsified.
>Thank you.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message