I have started work with EventHub recently and meet the problem: code of message producing executes without any exception, however message wasn't published to EventHub.
I'm verifying that message wasn't published via simple consumer in console application and via letters from our client (which owns EventHub account and has access to it's portal with metrics). Code of producer/consumer was taken from https://learn.microsoft.com/en-us/azure/event-hubs/get-started-dotnet-standard-send-v2.
Producer Code :
var ConnectionString = "Endpoint=sb://{EventHub Namespace}.servicebus.windows.net/;SharedAccessKeyName={KeyName};SharedAccessKey={Key};EntityPath={EventHub Instance}"
await using (var producerClient = new EventHubProducerClient(ConnectionString))
{
var batch = await producerClient.CreateBatchAsync();
batch.TryAdd(new EventData(Encoding.UTF8.GetBytes("test1 message")));
await producerClient.SendAsync(batch);
}
When I use same code with connection string to my private Eventhub, I'm able to send/receive messages in EventHub.
What could be the reason for EventHub client to execute producing message code without succesfully delivery of message?
Additional information:
Request to https://{EventHub Namespace}.servicebus.windows.net returns succesfull response.
".\psping.exe -n 25 -i 1 -q {EventHub Namespace}.servicebus.windows.net:5671 -nobanner" shows 0% loss