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

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


Hm, I made a mistake in my excitement :)

    {ok, Module} = proplists:get_value(Flavor, State#state.flavor_module),

should be

    Module = proplists:get_value(Flavor, State#state.flavor_modules),

where flavor_modules would contain something like [{direct,
amqp_direct_driver}, {network, amqp_network_driver}, {whatever,
amqp_whatever_driver}].

On Sun, Sep 7, 2008 at 8:06 PM, Edwin Fine
<rabbitmq-discuss_efine at usa.net>wrote:

> 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/9bcd210e/attachment.htm 


More information about the rabbitmq-discuss mailing list