[rabbitmq-discuss] More RabbitMQ Erlang client woes
Ben Hood
0x6e6562 at gmail.com
Fri May 9 12:10:51 BST 2008
Matthias,
On 9 May 2008, at 11:57, Matthias Radestock wrote:
> Ben Hood wrote:
>> To achieve this I think the cleanup should be contained within the
>> network driver either as a callback to allow the network driver to
>> stop the channel writer process or even linking the channel process
>> with the writer process so that when the channel exits, the writer
>> process receives a signal as well. I think I prefer the latter, but
>> this would mean changing the writer module, which is core module of
>> the server and we'd need to look at the implications of this.
>
> The server is already linking the writer and the channel, though the
> way that is done may not be immediately obvious.
Are you talking about start_link/4 in rabbit_channel? If I'm not
mistaken, this is linking the writing and the channel in the direct
case, but not in the network case.
In the network driver, the writer is started in the start_writer/2
function on a per channel basis:
start_writer(Sock, Channel) ->
rabbit_writer:start(Sock, Channel, ?FRAME_MIN_SIZE).
This then starts a new process to translate Erlang messages into AMQP
frames.
But this loop process is not linked to anything as far as I can see,
which is the behaviour that Edwin is reporting.
Ben
More information about the rabbitmq-discuss
mailing list