-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ServiceBusTransportType is always AmqpTcp #20910
Comments
Hi @kepar. Thank you for reaching out and we regret that you're experiencing difficulties. We definitely have a bug where the transport type isn't being reflected correctly in the However, I did confirm that the transport is being respected and passed as part of the options to the transport level. WebSockets is used for establishing the connection with the Event Hubs service. Which leaves us still needing to figure out why you're seeing the traffic as blocked. Is there an error being returned by the client that you're able to share? Can you confirm that your firewall isn't blocking the LinqPad trace for TransportType through the stack:var client = new ServiceBusClient("Endpoint=blah.foo.com;SharedAccessKeyName=blah;SharedAccessKey=fake", new ServiceBusClientOptions
{
TransportType = ServiceBusTransportType.AmqpWebSockets
});
client.TransportType.Dump();
var connection = typeof(ServiceBusClient).GetProperty("Connection", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(client);
connection.Dump();
var inner = connection.GetType().GetField("_innerClient", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(connection);
inner.Dump();
var scope = inner.GetType().GetProperty("ConnectionScope", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(inner);
scope.Dump();
var scopeTransport = scope.GetType().GetProperty("Transport", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(scope);
scopeTransport.Dump(); |
Hi @jsquire Thank u for the prompt reply! I was indeed a bit to focused on the
the internal TransportType is not "correct" or maybe this is no longer supported: with this exception as a result: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond." I can confirm it works as expected now when using the so al that remains is the bug where the transport type isn't being reflected correctly in the ServiceBusClient property (when using the ServiceBusClientOptions) |
Hi @kepar. You are correct that the transport type must be set as an option; we don't support configuration of the clients via connection string - just the basic form needed to establish a connection and available in the Azure portal. |
I just fixed up the property mismatch and added some additional context around the connection string semantics. I'm going to close this out, but please feel free to reopen if you'd like to discuss further. |
Describe the bug
When creating a new ServiceBusClient the ServiceBusTransportType configured via options or the connectionstring is ignored.
the resulting TransportType is always AmqpTcp.
Expected behavior
ServiceBusTransportType.AmqpWebSockets should be used
Actual behavior (include Exception or Stack Trace)
Wrong Transporttype is used, and gets blocked by corporate firewall.
To Reproduce
new console application
Add PackageReference to "zure.Messaging.ServiceBus Version 7.1.2
or
Environment:
The text was updated successfully, but these errors were encountered: