| Author |
Message |
|
| Guest |
Posted: Thu Dec 31, 2009 4:52 am |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Wed Jan 06, 2010 11:27 am |
|
|
|
Guest
|
Hi Vishnu,
On Thu, Dec 31, 2009 at 10:21:30AM +0530, vishnu wrote:
> I'm trying to understand how transactions help on the ack side of things.
> I can understand how I'd do a tx_select, a basic ack, my processing and then
> a tx_commit.
You could do that, yes. But that's not the usual case. The usual case on
consumption is to just ack when you're done with processing a message -
no need to use tx at that point.
However, if, as part of your processing, you need to both ack a message
and publish some other messages, then you may well want that to be an
atomic unit - i.e. either they both happen, or neither happen. So at
that point, you can set tx_commit on the channel, and then when
processing the received message, you can publish and ack and only when
you finally tx_commit, do the actions of your transaction take effect.
Thus if you crash, both the act and all publishes get forgotten.
> But when would I do a tx_rollback?
If, at the application level, you realise due to some external event
that you wish to cancel everything that you've done in this transaction,
use tx_rollback.
Matthew
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Jan 06, 2010 12:08 pm |
|
|
|
Guest
|
Hi Vishnu,
(Please keep the discussion list CC'd unless you explicitly want to take
the discussion off list - that way google can index these questions for
others to find).
On Wed, Jan 06, 2010 at 05:23:23PM +0530, vishnu wrote:
> I guess the part that confuses me is when I recieve a message, try to
> perform a bunch of operations in a transaction and then rollback.
> now Im still holding onto the message and it still isn't acked. so my only
> option is to actually try again. Is that right?
Yes. Or you could close the channel or connection at which point the
message will automatically be requeued.
Matthew
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Jan 06, 2010 2:29 pm |
|
|
|
Guest
|
Hi Matthew
sure thing, sorry the list doesn't seem to be configured right. The default reply behavior should be to the list :/
On Wed, Jan 6, 2010 at 5:37 PM, Matthew Sackman <matthew@lshift.net (matthew@lshift.net)> wrote:
Quote: Hi Vishnu,
(Please keep the discussion list CC'd unless you explicitly want to take
the discussion off list - that way google can index these questions for
others to find).
On Wed, Jan 06, 2010 at 05:23:23PM +0530, vishnu wrote:
> |
|
|
| Back to top |
|
| Guest |
Posted: Wed Jan 06, 2010 7:31 pm |
|
|
|
Guest
|
> sure thing, sorry the list doesn't seem to be configured right. The default
> reply behavior should be to the list :/
hehe. also, don't forget that vi beats emacs, linux beats freebsd,
and c++ beats java I don't think the list reply behaviour debate
will ever end, but for what it's worth, I also like lists that are
configured so that reply replies to the list.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
| pennyplayersclub |
Posted: Wed Oct 05, 2011 12:02 pm |
|
|
|
Joined: 04 Oct 2011
Posts: 8
|
| now a most are prefer like this..... |
|
|
| Back to top |
|
| sergiumahine9 |
Posted: Wed May 30, 2012 10:56 pm |
|
|
|
Joined: 30 May 2012
Posts: 3
|
So at
that point, you can set tx_commit on the channel, and then when
processing the received message, you can publish and ack and only when
you finally tx_commit, do the actions of your transaction take effect. |
_________________ Cohiba Behike 56 |
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|