|
88 | 88 | %% <li>node :: atom() - The node the broker runs on (direct only)</li>
|
89 | 89 | %% <li>adapter_info :: amqp_adapter_info() - Extra management information for if
|
90 | 90 | %% this connection represents a non-AMQP network connection.</li>
|
91 |
| -%% <li>client_properties :: [{binary(), atom(), binary()}] - A list of extra |
92 |
| -%% client properties to be sent to the server, defaults to []</li> |
| 91 | +%% <li>client_properties :: [{binary(), atom(), binary()}] |
| 92 | +%% | #{binary() => binary()} |
| 93 | +%% - A list (or a map) of extra client properties to be sent to the server, |
| 94 | +%% defaults to []</li> |
93 | 95 | %% </ul>
|
94 | 96 | %%
|
95 | 97 | %% @type amqp_params_network() = #amqp_params_network{}.
|
|
116 | 118 | %% defaults to 30000 (network only)</li>
|
117 | 119 | %% <li>ssl_options :: term() - The second parameter to be used with the
|
118 | 120 | %% ssl:connect/2 function, defaults to 'none' (network only)</li>
|
119 |
| -%% <li>client_properties :: [{binary(), atom(), binary()}] - A list of extra |
120 |
| -%% client properties to be sent to the server, defaults to []</li> |
| 121 | +%% <li>client_properties :: [{binary(), atom(), binary()}] |
| 122 | +%% | #{binary() => binary()} |
| 123 | +%% - A list (or a map) of extra client properties to be sent to the server, |
| 124 | +%% defaults to []</li> |
121 | 125 | %% <li>socket_options :: [any()] - Extra socket options. These are
|
122 | 126 | %% appended to the default options. See
|
123 | 127 | %% <a href="https://www.erlang.org/doc/man/inet.html#setopts-2">inet:setopts/2</a>
|
@@ -155,10 +159,12 @@ start(AmqpParams, ConnName) when ConnName == undefined; is_binary(ConnName) ->
|
155 | 159 | ensure_started(),
|
156 | 160 | AmqpParams0 =
|
157 | 161 | case AmqpParams of
|
158 |
| - #amqp_params_direct{password = Password} -> |
159 |
| - AmqpParams#amqp_params_direct{password = credentials_obfuscation:encrypt(Password)}; |
160 |
| - #amqp_params_network{password = Password} -> |
161 |
| - AmqpParams#amqp_params_network{password = credentials_obfuscation:encrypt(Password)} |
| 162 | + #amqp_params_direct{password = Password, client_properties = Props} -> |
| 163 | + AmqpParams#amqp_params_direct{password = credentials_obfuscation:encrypt(Password), |
| 164 | + client_properties = rabbit_data_coercion:to_proplist(Props)}; |
| 165 | + #amqp_params_network{password = Password, client_properties = Props} -> |
| 166 | + AmqpParams#amqp_params_network{password = credentials_obfuscation:encrypt(Password), |
| 167 | + client_properties = rabbit_data_coercion:to_proplist(Props)} |
162 | 168 | end,
|
163 | 169 | AmqpParams1 =
|
164 | 170 | case AmqpParams0 of
|
|
0 commit comments