activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remo Gloor (JIRA)" <>
Subject [jira] [Created] (AMQ-4337) Messages with AMQ_SCHEDULED_DELAY do not respect transactions
Date Wed, 20 Feb 2013 15:07:13 GMT
Remo Gloor created AMQ-4337:

             Summary: Messages with AMQ_SCHEDULED_DELAY do not respect transactions
                 Key: AMQ-4337
             Project: ActiveMQ
          Issue Type: Improvement
            Reporter: Remo Gloor

Currently delayed messages are delivered even if the session it was sent in is rolled back.
According to
this is because the message can be delivered far in the future and the transaction would take
to long.

I don't agree with that argument. The transaction can be short living. It is only the enqueuing
of the delayed message in the broker that has to be part of the transaction. The delivery
to the consumer is not part of the transaction anymore.

e.g. consider the scenario in the following preudo code:

    while (application_runs)
        msg = session.Receive();
        if (random(5) != 0) throw exception;
    } catch { session.Rollback; }

Currently a delayed message is sent for each retry. So we will get a lot more messages in
the future as we would expect. When delayed messages would respect transactions just the successful
ones would be enqueued. The other ones are rolledback with the transaction.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message