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

Unable to send message into Service Bus Queue using Azure function

$
0
0
[FunctionName("Demo")]publicstaticvoidRun([ServiceBusTrigger("%Demo-Queue%",Connection="AzureWebJobsBPGAServiceBus")]string myQueueItem,[ServiceBus("%Update-Queue%",Connection="AzureWebJobsBPGAServiceBus")]ICollector<BrokeredMessage> updateMessage,TraceWriter log){string query ="SELECT Id FROM MyTable";var data = dbs.GetData(query).GetAwaiter().GetResult();BrokeredMessage brokeredMessage;foreach(var item in data){JObject jObject =newJObject(newJProperty("Id", item),newJProperty("MessageId",newGuid(item)));
                brokeredMessage =newBrokeredMessage(jObject.ToString());
                updateMessage.Add(brokeredMessage);}}

But message going in dead letter queue . why ? Message format is also correct.Any clue ?

I tried using another queue it works fine, also delete that queue and re-create which has issue still message goes into dead letter queue and message property delivery count is 11.


SE


Viewing all articles
Browse latest Browse all 1916

Trending Articles



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