[rabbitmq-discuss] Re storing a message to the queue
aloroi18 at gmail.com
Tue Feb 21 14:14:57 GMT 2012
Thanks for your quick reply. I think that my problem is not really to
restore a message, because if I check with the RabbitMQ command line (using
"rabbitmqctl list_queues"),I can see that the message I sent is stored in
the queue. My problem is rather to be able to retrieve the message to my
I've created a project (with C# .net) where the consumer can choose whether
he wants to be connected or disconnected from the queue.
When the consumer chooses the disconnect radiobutton, I'm writing in the
consumer.onMessageReceived -= handleMessage;
This causes to go to the catch of this loop:
RabbitMQ.Client.Events.BasicDeliverEventArgs e =
IBasicProperties props = e.BasicProperties;
byte body = e.Body;
// ... process the message
Now, the producer sends a message, and the message is stocked in the queue.
Then, the consumer chooses the Connect RadioButton. I'm expecting to see the
message on the consumer GUI, but I'm not.
I checked the consumer instance's properties during debugging and I saw
that:m_queue count=0. This explains why I don't see any message on my
If I do the same experience with more than one message, I will be able to
retrieve all the messages except the first one.
I think that the reason to this is that the consumer instance goes through a
Dequeue() before the user chooses the disconnect radiobutton and maybe due
to this, there is no possibility to retrieve the message from the queue.
But maybe I'm wrong. However, the problem is still the same: I can't
retrieve the first message.
Could you help me?if you can't, give me a link to someone who could help.
Thanks a lot,I've been working on this for several days
Alvaro Videla-2 wrote:
> It all depends on why you want the message to be back in the queue. Also
> you want the exact message to be back in the queue or just the contents of
> If you want the exact message you can basic.reject it I guess. See the
> here: http://www.rabbitmq.com/amqp-0-9-1-quickref.html
> If you just want the msg body back in the queue then you can republish the
> message body.
> On Tue, Feb 21, 2012 at 10:29 AM, Bamboula <aloroi18 at gmail.com> wrote:
>> After using Dequeue() to my queue, I want to restore the retrieved
>> the queue. Is this possible?
>> View this message in context:
>> Sent from the RabbitMQ mailing list archive at Nabble.com.
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
View this message in context: http://old.nabble.com/Restoring-a-message-to-the-queue-tp33362597p33364165.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
More information about the rabbitmq-discuss