I'm using a Connection string to connect with the Azure Event Hub.
The EventHubsConnectionStringBuilder does not have this property at all. And the ServiceBusConnectionStringBuilder creates a connection string that the EventHubClient does not accept.
So... how do I then disable this flag in order to avoid the usage of port 104xx ?
System.ArgumentException HResult=0x80070057 Message=Illegal connection string parameter name 'EnableAmqpLinkRedirect' Parameter name: connectionString Source=Microsoft.Azure.EventHubs StackTrace: at Microsoft.Azure.EventHubs.EventHubsConnectionStringBuilder.ParseConnectionString(String connectionString) at Microsoft.Azure.EventHubs.EventHubsConnectionStringBuilder..ctor(String connectionString) at Microsoft.Azure.EventHubs.EventHubClient.CreateFromConnectionString(String connectionString) at Nodinite.LogAgent.PickupService.Helpers.AzureEventHubHelper.GetEventHubClient() in C:\Projects\Nodinite\LogAgent.PickupService\Nodinite.LogAgent.PickupService\Helpers\EventHubHelper.cs:line 59
EnableLinkRedirect feature was implemented by the
Microsoft.ServiceBus.Messaging library and enabled by default. The implementation was not brought forward into the
Microsoft.Azure.EventHubs library, which is why you're unable to find a means to disable it.
That feature works by establishing a connection to the Event Hubs gateway using the standard AMQP ports (5671, 5672) and requesting that the service provide discovery for partition nodes to directly connect, which is where the 104xx port range would be used.
By default, the service does not attempt to redirect and the
Microsoft.Azure.EventHubs library does not opt-in to that feature when connecting. As a result, you should only be seeing Event Hubs traffic over the standard AMQP ports.
User contributions licensed under CC BY-SA 3.0