I've just swapped out the whole amqp_client infrastructure in my erlang application to the latest release. It looks like there were significant changes to the infrastructure but the api remains almost identical (the network vs direct connection being the only exception I've found). But now I'm getting an error in code that used to work about my subscription. My code looks like this:<div>
<br></div><div><br></div><div>%% Queue is a binary name, Listener is a PID and State is a dictionary containing various things including the channel PID</div><div><div>subscribe(Queue,Listener,State) -></div><div> Sub = #'basic.consume'{queue = Queue},</div>
<div> #'basic.consume_ok'{consumer_tag = Tag} = amqp_channel:subscribe(State:fetch(amqp_channel_pid), Sub, Listener),</div><div> {ok, Tag}.</div></div><div><br></div><div><br></div><div>This worked with the previous version of the library and I don't see any difference in the docs (<a href="http://www.rabbitmq.com/erlang-client-user-guide.html">http://www.rabbitmq.com/erlang-client-user-guide.html</a>) now it produces the following error:</div>
<div><br></div><div><div> {{function_clause,</div><div> [{amqp_selective_consumer,handle_consume_ok,</div><div> [{'basic.consume_ok',</div><div> <<"amq.ctag-yC9CxaknYwPrAYj5hCChPQ==">>},</div>
<div> {'basic.consume',0,<<"harbinger-dm-hipaa">>,<<>>,</div><div> false,false,false,false,[]},</div><div> {state,</div>
<div> {dict,0,16,16,8,80,48,</div><div> {[],[],[],[],[],[],[],[],[],[],[],[],[],</div><div> [],[],[]},</div><div> {{[],[],[],[],[],[],[],[],[],[],[],[],[],</div>
<div> [],[],[]}}},</div><div> hipaa,</div><div> {dict,0,16,16,8,80,48,</div><div> {[],[],[],[],[],[],[],[],[],[],[],[],[],</div>
<div> [],[],[]},</div><div> {{[],[],[],[],[],[],[],[],[],[],[],[],[],</div><div> [],[],[]}}},</div><div> none}]},</div>
<div> {amqp_gen_consumer,handle_call,3},</div><div> {gen_server2,handle_msg,2},</div><div> {proc_lib,init_p_do_apply,3}]},</div><div> {gen_server2,call,</div>
<div> [<0.181.0>,</div><div> {consumer_call,</div><div> {'basic.consume_ok',</div><div> <<"amq.ctag-yC9CxaknYwPrAYj5hCChPQ==">>},</div>
<div> {'basic.consume',0,<<"harbinger-dm-hipaa">>,<<>>,</div><div> false,false,false,false,[]}},</div><div> infinity]}}</div>
</div><div><br></div><div>There is a clause in the new docs that explains the difference between the selective consumer and the direct consumer. Based on that description it seems like everything used to be a direct consumer and that's what I should be using, but I don't see any docs on how to use it. I explored the rabbit headers and couldn't find anything that would let me select it. The only mention of it I found was when selective consumer is set as the default.</div>
<div><br></div><div>Thanks,</div><div>-Max</div>