Recently I run into a challenge. I’ working on a micro-service that receives and processes messages one by one. How to send Service Bus messages, not instantly, but when they pile up? The reason for cause it is expensive when it comes to performance. Let’s send messages after 10 piles up or after every 20 seconds.… Continue reading Buffered sending Service Bus messages
Tag: azure service bus
Receiving only one message from Azure Service Bus
Some time ago I got a question from Eto: “How would I go about this if I just want to receive one message only?” And I started thinking… is it possible in .Net Core? I used the newest Microsoft.Azure.ServiceBus package, that is dedicated for .Net Core, but there is no method to receive only one… Continue reading Receiving only one message from Azure Service Bus
Sending Service Bus message in Go
Go or GoLang is an open source programming language. It’s a server-side C like language created by Google. I won’t take much or your time to introduce you to the language, but here is a short summary why it’s worth trying. Go is open-source, but backed up by Google and used by big companies (Google,… Continue reading Sending Service Bus message in Go
Receiving messages from Azure Service Bus in .Net Core
For some time now we can observe how new .Net Core framework is growing and become more mature. Version 2.0 was released in August 2017 and it is more capable and supports more platforms then it’s previous releases. But the biggest feature of this brand new Microsoft framework is its performance and it’s ability to… Continue reading Receiving messages from Azure Service Bus in .Net Core
Getting messages from Service Bus queue
In the previous post I discussed how to implement sending messages. In this post I will show how to receive messages. The simplest code looks like this: static void GetMessage() { try { var queueClient = GetQueueClient(); var message = queueClient.Receive(); Console.WriteLine(“Received a message: ” + message.GetBody<string>()); } catch (Exception ex) { Console.WriteLine(“An exception occured:… Continue reading Getting messages from Service Bus queue
Sending messages to Azure Service Bus queue
To connect to Azure Service Bus you need to import nuget package: WindowsAzure.ServiceBus. Next step would be getting a connection string to your resource group. It can be found in Azure Portal, in Service Bus section. It should look like this: Copy connection string – primary key and paste it in App.config file. A key… Continue reading Sending messages to Azure Service Bus queue