[rabbitmq-discuss] Reusing a channel or creating new ones
Alvaro Videla
videlalvaro at gmail.com
Sat May 3 07:35:52 BST 2014
You can have one TCP connection and then multiple channels. Usually in
something like Java you will have one channel per consumer thread.
Have you seen the explanation given here:
http://www.rabbitmq.com/tutorials/amqp-concepts.html ?
On Fri, May 2, 2014 at 7:51 AM, Martin Koroudjiev
<mrtndimitrov at gmail.com> wrote:
> Thank you, Alvaro. I wonder why we then have both channels and
> connections...
>
> Martin
>
> On 5/2/2014 3:17 AM, Alvaro Videla wrote:
>> Hi,
>>
>> There's no need to open a new channel for every message published, in
>> fact, it will be faster to use the same channel.
>>
>> About message acks, you have to send the acks on the same channel
>> where the message where received, since the delivery tags of messages
>> are scoped per channel.
>>
>> Regards,
>>
>> Alvaro
>>
>> On Fri, May 2, 2014 at 12:57 AM, Martin Koroudjiev
>> <mrtndimitrov at gmail.com> wrote:
>>> Hello,
>>>
>>> Should I reuse the channel when sending messages or create a new one for
>>> each send operation? Do I keep it around while listening for messages
>>> and acknowledging them with the old channel or should I create a new one
>>> for the acknowledge operation?
>>>
>>> Thanks,
>>>
>>> Martin
>>> _______________________________________________
>>> rabbitmq-discuss mailing list
>>> rabbitmq-discuss at lists.rabbitmq.com
>>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list