-
Notifications
You must be signed in to change notification settings - Fork 882
Open
Description
A call to DescribeTopicsAsync for an existing topic with otherwise working connection parameters for Event Hub never returns.
Example code:
using Confluent.Kafka;
const string BootstrapServers = "********.servicebus.windows.net:9093";
const string TopicName = "ExistingTopic";
const string Username = "$ConnectionString";
const string Password = "Endpoint=sb://****************";
var config = new Confluent.Kafka.AdminClientConfig
{
BootstrapServers = BootstrapServers,
SecurityProtocol = Confluent.Kafka.SecurityProtocol.SaslSsl,
SaslMechanism = Confluent.Kafka.SaslMechanism.Plain,
SaslUsername = Username,
SaslPassword = Password
};
try
{
using (var adminClient = new AdminClientBuilder(config).Build())
{
var topicCollection = TopicCollection.OfTopicNames(new List<string> { TopicName });
var options = new Confluent.Kafka.Admin.DescribeTopicsOptions() { RequestTimeout = TimeSpan.FromSeconds(10) };
Console.WriteLine($"BEGIN Describing topics");
var describeTopicsResult = await adminClient.DescribeTopicsAsync(topicCollection, options).ConfigureAwait(false);
Console.WriteLine($"END Describing topics");
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
The END Describing topics console output is never printed.
An ArgumentNullException can be caught by enabling Common Language Runtime Exceptions in Exception Settings in Visual Studio but the exception never reaches the DescribeTopicsAsync caller. Stack trace is:
> System.Private.CoreLib.dll!System.ArgumentNullException.Throw(string paramName) Line 71 C#
System.Private.CoreLib.dll!System.Runtime.InteropServices.Marshal.CopyToManaged<nint>(nint source, nint[] destination, int startIndex, int length) Line 925 C#
Confluent.Kafka.dll!Confluent.Kafka.AdminClient.extractNodeList(nint nodesPtr, int nodesCount) Unknown
Confluent.Kafka.dll!Confluent.Kafka.AdminClient.extractTopicPartitionInfo.AnonymousMethod__20_0(nint topicPartitionInfoPtr) Unknown
System.Linq.dll!System.Linq.Enumerable.SelectArrayIterator<nint, Confluent.Kafka.TopicPartitionInfo>.Fill(System.ReadOnlySpan<nint> source, System.Span<Confluent.Kafka.TopicPartitionInfo> destination, System.Func<nint, Confluent.Kafka.TopicPartitionInfo> func) Unknown
System.Linq.dll!System.Linq.Enumerable.SelectArrayIterator<nint, Confluent.Kafka.TopicPartitionInfo>.ToList() Unknown
Confluent.Kafka.dll!Confluent.Kafka.AdminClient.extractTopicPartitionInfo(nint topicPartitionInfosPtr, int topicPartitionInfosCount) Unknown
Confluent.Kafka.dll!Confluent.Kafka.AdminClient.extractDescribeTopicsResults.AnonymousMethod__21_0(nint topicPtr) Unknown
System.Linq.dll!System.Linq.Enumerable.SelectArrayIterator<nint, Confluent.Kafka.Admin.TopicDescription>.Fill(System.ReadOnlySpan<nint> source, System.Span<Confluent.Kafka.Admin.TopicDescription> destination, System.Func<nint, Confluent.Kafka.Admin.TopicDescription> func) Unknown
System.Linq.dll!System.Linq.Enumerable.SelectArrayIterator<nint, Confluent.Kafka.Admin.TopicDescription>.ToList() Unknown
Confluent.Kafka.dll!Confluent.Kafka.AdminClient.extractDescribeTopicsResults(nint resultPtr) Unknown
Confluent.Kafka.dll!Confluent.Kafka.AdminClient.StartPollTask.AnonymousMethod__0() Unknown
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 138 C#
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot, System.Threading.Thread threadPoolThread) Line 2190 C#
Metadata
Metadata
Assignees
Labels
No labels