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

Azure function takes time to send brokered messages to service bus queue

$
0
0

Hi Team,

I have implemented ones simple functionality to send a brokered message to service bus queue, but when i am verifying the performance of my azure function maximum time takes in sending messages to queue. Can any one help me on this what im doing wrong while sending messages to service bus queue.

my code: 

// objRequest is request recived from http trigger
string queueMessageJson = JsonConvert.SerializeObject(objRequest);
var queueStream = new MemoryStream(Encoding.UTF8.GetBytes(queueMessageJson));
BrokeredMessage objBrokeredmsg = new BrokeredMessage(queueStream);
var queueToSendMessage = QueueClient.CreateFromConnectionString(servicebusconnectionstring, "queuename");
queueToSendMessage.RetryPolicy = new RetryExponential(minBackoff: TimeSpan.FromSeconds(0.1), maxBackoff: TimeSpan.FromSeconds(30), maxRetryCount: 20);
queueToSendMessage.Send(objBrokeredmsg);

Can anyone help what i'm doing wrong which takes time to send message to queue.




Viewing all articles
Browse latest Browse all 1916

Trending Articles



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