[rabbitmq-discuss] [BUG] Erlang RabbitMQ client requires installed server code

Edwin Fine rabbitmq-discuss_efine at usa.net
Mon Sep 8 01:06:19 BST 2008


Let me make a constructive suggestion. By using the configuration, we could
avoid the compile-time dependency on either of those modules, and at the
same time we could make amqp_connection more flexible.

%% Starts a new channel. Flavor is direct or network. flavor_module is set
up to be
%% one of amqp_direct_driver or amqp_network_driver (or, some other driver -
e.g. future amqp_wmq_driver)
handle_call({Flavor, ChannelNumber, OutOfBand}, From, State) ->
    {ok, Module} = proplists:get_value(Flavor, State#state.flavor_module),
    handle_start({ChannelNumber, OutOfBand},
                 fun Module:open_channel/3,
                 fun Module:close_channel/1,
                 fun Module:do/2,
                 fun Module:do/3,
                 State);

What do you think?

Regards,
Edwin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080907/ba2aeb00/attachment.htm 


More information about the rabbitmq-discuss mailing list