I'm trying to experiment with the RabbitMQ Erlang client bindings. I want to do this from the Erlang shell.
I can successfully load the relevant modules, and I can load the record types:
1> rr(amqp_connection).
['P_access','P_basic','P_channel'|...]
2> rl(amqp_params_network).
-record(amqp_params_network,{username = <<"guest">>,
password = <<"guest">>,
virtual_host = <<"/">>,
...etc.
but when I try to actually connect:
{ok, C} = amqp_connection:start(#amqp_params_network{}).
...I get the error...
** exception error: no function clause matching
erl_eval:expr(amqp_auth_mechanisms,[],
{eval,#Fun<shell.21.103280319>},
{value,#Fun<shell.5.103280319>},
none) (erl_eval.erl, line 200)
The only thing I can think of is that amqp_params_network
has some functions as default record values:
...
ssl_options = none,
auth_mechanisms =
[fun amqp_auth_mechanisms:plain/3,
fun amqp_auth_mechanisms:amqplain/3],
client_properties = [],
...
How do I get past this, so that I can play with this stuff in the Erlang shell?