Skip to content

Instantly share code, notes, and snippets.

@rlipscombe
Created September 5, 2017 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlipscombe/3350a2d089d2d87bdf6c01cb1ba3a170 to your computer and use it in GitHub Desktop.
Save rlipscombe/3350a2d089d2d87bdf6c01cb1ba3a170 to your computer and use it in GitHub Desktop.
AMQP.Net Lite, talking to Qpid C++ broker, without TLS
// Problem:
// qpidd reports "[System] error SASL layer required!"
// amqpnetlite reports: "Authentication failed because the remote party has closed the transport stream."
//
// Reason:
// You're connecting to the plaintext qpidd port, and you don't have SASL configured.
//
// Solution:
// Pass scheme: "amqp" to the Address ctor ----------vvvv
var address = new Address("localhost", 5672, scheme: "amqp");
var factory = new ConnectionFactory();
factory.SASL.Profile = SaslProfile.Anonymous;
var connection = await factory.CreateAsync(address);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment