Carl Trieloff wrote:
Rafael Schloming wrote:
Carl Trieloff wrote:
Arnuad Simon, Mark Little, Gordon Sim drove most of the transaction
work with Cisco in AMQP 0-10. In terms of txns spanning queue.declare
etc, the spec supports/makes that possible.
Just to clarify this a bit the spec only defines transactional
semantics for message enqueue and message dequeue operations. So while
you can in fact do a queue.declare in the middle of either a
distributed or local transaction, the queue.declare is not
transactional. In other words commit and rollback only operate on
message enqueue and message dequeue operations.
--Rafael
Rafi,
The way the spec is written, there is nothing preventing an impl to make
queue.declare transactional. I know the spec is silent on the issue but
I know of nothing preventing an impl from doing that. Arnaud / Gordon
can confirm. I know our code does not transactional declare yet.
The protocol grammar does permit queue.declare to appear within
transactional boundaries, however the semantics of both commit and
rollback are defined explicitly in terms of message enqueues and
dequeues. So while there is no functional limitation that would prevent
an implementation from making queue.declare transactional, such an
implementation would not conform with the spec language:
tx.commit:
"This method commits all messages published and acknowledged in the
current transaction. A new transaction starts immediately after a
commit."
tx.rollback:
"This method abandons all messages published and acknowledged in the
current transaction. A new transaction starts immediately after a
rollback."
dtx.commit:
"Commit the work done on behalf a transaction branch. This method
commits the work associated with xid. Any produced messages are
made available and any consumed messages are discarded."
dtx.rollback:
"This method rolls back the work associated with xid. Any produced
messages are discarded and any consumed messages are re-enqueued."
I know the issue of expanding the transactional semantics to include
exchange/queue wiring was mentioned during the dtx discussions, but at
the time it was considered out of scope for 0-10. If this is something
you think is important it might be worth raising the issue.
--Rafael