我使用這些代碼段將發佈一個eventhub事件:eventhub出版很慢
// ...
var eventHubClient = EventHubClient.CreateFromConnectionString(ConnectionString, EventHubName);
// ...
var serializerSettings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.None };
var data = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(evt, serializerSettings));
var eventToBeSend = new EventData(data) {PartitionKey = "Bla"};
eventHubClient.Send(eventToBeSend);
這似乎是很慢(即eventHubClient.Send方法調用需要相當長的時間)。我能做些什麼來加快速度?
如果TU設置不當,可能會變成瓶頸並降低性能。 –
會做,謝謝 –