Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Make RPC client response queues auto-delete and exclusive
Browse files Browse the repository at this point in the history
Patch by Witeman Zheng.
  • Loading branch information
michaelklishin committed Aug 14, 2014
1 parent c578799 commit 7b05def
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/amqp_rpc_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ call(RpcClient, Payload) ->
%% Sets up a reply queue for this client to listen on
setup_reply_queue(State = #state{channel = Channel}) ->
#'queue.declare_ok'{queue = Q} =
amqp_channel:call(Channel, #'queue.declare'{}),
amqp_channel:call(Channel, #'queue.declare'{exclusive = true,
auto_delete = true}),
State#state{reply_queue = Q}.

%% Registers this RPC client instance as a consumer to handle rpc responses
Expand Down

0 comments on commit 7b05def

Please sign in to comment.