brokeredmessage

Sending 1000 brokered messages to the service bus using the SendBatchAsync method

徘徊边缘 提交于 2019-12-06 06:24:29
I have an application wherein data is fetched from the SQL DB and sent to the service bus as brokered message. These are the steps: Data fetched from the DB(in batches of 1000) Each row of data converted into Brokered Message and added into a list. The list of 1000 brokered messages is sent to the service bus using SendBatchAsync method. It is at the 3rd step that I am facing the issue. This is the code for that: public async Task SendMessagesAsync(List<BrokeredMessage> brokeredMessageList) { try { var topicClient = CreateTopicClient(); await topicClient.SendBatchAsync(brokeredMessageList); }