diff --git a/include/amqp_client.hrl b/include/amqp_client.hrl index d4040b89..e827cdb9 100644 --- a/include/amqp_client.hrl +++ b/include/amqp_client.hrl @@ -46,12 +46,13 @@ adapter_info = none, client_properties = []}). --record(adapter_info, {address = unknown, - port = unknown, - peer_address = unknown, - peer_port = unknown, - name = unknown, - protocol = unknown}). +-record(adapter_info, {address = unknown, + port = unknown, + peer_address = unknown, + peer_port = unknown, + name = unknown, + protocol = unknown, + additional_info = []}). -define(LOG_DEBUG(Format), error_logger:info_msg(Format)). -define(LOG_INFO(Format, Args), error_logger:info_msg(Format, Args)). diff --git a/src/amqp_direct_connection.erl b/src/amqp_direct_connection.erl index 87b9c4ad..4699d5dd 100644 --- a/src/amqp_direct_connection.erl +++ b/src/amqp_direct_connection.erl @@ -91,6 +91,8 @@ info_keys() -> infos(Items, State) -> [{Item, i(Item, State)} || Item <- Items]. +additional_info(#state{adapter_info = I}) -> I#adapter_info.additional_info. + connect(Params = #amqp_params_direct{username = Username, node = Node, adapter_info = Info, @@ -102,7 +104,8 @@ connect(Params = #amqp_params_direct{username = Username, adapter_info = ensure_adapter_info(Info)}, case rpc:call(Node, rabbit_direct, connect, [Username, VHost, ?PROTOCOL, - infos(?CREATION_EVENT_KEYS, State1)]) of + infos(?CREATION_EVENT_KEYS, State1) ++ + additional_info(State1)]) of {ok, {User, ServerProperties}} -> {ok, Collector} = SIF(), State2 = State1#state{user = User,