[rabbitmq-discuss] Transaction

David sUAREZ d.suarez at aquaesolutions.com
Wed Jun 6 10:59:09 BST 2012


The ack is handled with the method.

The pseudocode will be something like this:

channel1.Open("queueA")
channel2.Open("queueB")

While (true)
   message = channel1.Receive()
   message2 = process(message) // Process message
   channel2.Send(message2)
   channel1.Ack
End While

I would like this below in the same transaction:

   channel2.Send(message2)
   channel1.Ack

Sorry, I use dot net. 

Thanks





pangj wrote:
> 
> 
>> 4) The subcriptor which received the message sends the ACK to RabbitMQ.
> 
> 
> Hi,
> 
> May I ask the ack is sent automatically, or by hand with a method call?
> 
> I ask this because, my test script below, I don't know if the Perl 
> client has sent an ACK to broker or not, when it finish receiving and 
> handling the message.
> 
> use strict;
> use Net::RabbitMQ;
> 
> my $channel = 1001;
> my $queuename = "myqueue";
> my $mq = Net::RabbitMQ->new();
> 
> $mq->connect("localhost", { vhost=>"/myhost", user => "***", password => 
> "***" });
> $mq->channel_open($channel);
> 
> while (1) {
>      my $hashref = $mq->get($channel, $queuename);
>      last unless defined $hashref;
>      print $hashref->{message_count}, ": ", $hashref->{body},"\n";
> }
> 
> $mq->disconnect();
> 
> 
> Thanks.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 
> 
-- 
View this message in context: http://old.nabble.com/Transaction-tp33968899p33968999.html
Sent from the RabbitMQ mailing list archive at Nabble.com.



More information about the rabbitmq-discuss mailing list