Skip to content

Instantly share code, notes, and snippets.

@stevenlivz
Created September 7, 2017 09:36
Show Gist options
  • Select an option

  • Save stevenlivz/27974c9f4bb00bef1bb76cbd05b15654 to your computer and use it in GitHub Desktop.

Select an option

Save stevenlivz/27974c9f4bb00bef1bb76cbd05b15654 to your computer and use it in GitHub Desktop.
connect() ->
io:format("Connecting~n"),
Hostname = "mybroker.servicebus.windows.net",
Port = 5671,
User = <<"test">>,
Password = <<"xxxxxx=">>,
OpnConf = #{address => Hostname,
port => Port,
tls_opts => {secure_port, [{versions, ['tlsv1.1']}]},
container_id => <<"test">>,
sasl => {plain, User, Password}
},
{ok, Connection} = amqp10_client:open_connection(OpnConf),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment