[rabbitmq-discuss] Best way to subscribe-unsubscribe-subscribe
Valentin Polezhaev
valentin.polezhaev at gmail.com
Thu Aug 22 10:35:29 BST 2013
I try this at init step:
_connection = _connectionFactory.CreateConnection();
_channel = _connection.CreateModel();
_channel.BasicQos(0, 1, false); //params are: prefetchSize,
prefetchCount, global
_basicConsumer = new QueueingBasicConsumer(_channel)
{ConsumerTag = GetTag()};
and now I can only read one first message from A. When I try to read first
message from B I have exactly same problem.
_channel.BasicQos(0, 1, false); method call I took from old .NET client
docs.
Thanks.
2013/8/22 Michael Klishin <mklishin at gopivotal.com>
> Valentin Polezhaev:
>
> > My code successfully reads first messages from both A and B queues, but
> third time (second read from A) it stays at line
> > var ea = (BasicDeliverEventArgs) _basicConsumer.Queue.Dequeue();
> > and nothing happens.
>
> Just to clarify:
>
> this particular behavior is likely due to the following: both messages in
> A were already delivered,
> and take off the (internal to the client) linked queue, so subsequent
> invocations
> will block the caller until a new delivery arrives.
> --
> MK
>
>
--
With best regards, Valentin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130822/d9b0e1bb/attachment.htm>
More information about the rabbitmq-discuss
mailing list