Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Using PartitionedSender to send an event to an EventHub got exception.

$
0
0

var manager = NamespaceManager.CreateFromConnectionString(xxx);
var eventHubSender = eventHubClient.CreatePartitionedSender(description.PartitionIds[0]);

eventHubSender.Send(new EventData("Hello") {PartitionKey=eventHubSender.PartitionId);

result in

$exception{"The specified partition key '0' is invalid for partition '0'. Do not set a value for partition key or send using EventHubClient.Send."}System.Exception {System.ArgumentException}

What is wrong?


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>