Sending a Azure Service Bus message in ASP.NET core

ASP.NET Core is a open-source web framework that everyone are so excited about recently. There are some good arguments to be excited about it: ability to run on Windows, macOS and Linux, ability to host website in IIS, Nginx, Apache and Docker and it’s fast. Can it be used for Service Bus scenarios? Yes, it… Continue reading Sending a Azure Service Bus message in ASP.NET core

Custom data source in Application Insights

Application Insights(AI) is a park of Azure clous services, that gathers application telemetry data and is able to show it with nice charts. User can also query gathered data to create custom reports. To gather telemetry data user must only enable it in Visual Studio. Detailed instructions can be found here: https://docs.microsoft.com/en-us/azure/application-insights/app-insights-asp-net Creating custom data source… Continue reading Custom data source in Application Insights

Send messages in batch without exceeding a limit

Service Bus allows user to send messages in batches, which is great what it comes to performance. Differences sending messages in batches and separately can be huge. Actually, lets look at an example. This is a very simple send:

If we compare it to sending messages sequential, we get: So sending 200 messages sequential… Continue reading Send messages in batch without exceeding a limit

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:

Program will now receive a message, parse body as string and output it on console. But messages should be read as they appear, so there need to… 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

How to prevent ASP.Net api from going to sleep

Web Api is a framework to build HTTP based services, especially RESTful apis. It is designed to build request triggered action, where system will be ready to do some work when receiving a request. If it’s not asked, it shouldn’t do anything and in a while it will go to sleep. Problem starts when you’re planning… Continue reading How to prevent ASP.Net api from going to sleep

Azure Service Bus – introduction

Azure Service Bus is a Microsoft implementation of a messaging system, that works seamlessly in the cloud and does not require to set up a server of any kind. Messaging is a good alternative for communication between micro-services. Let’s compare the two. REST communication contract constrains may be a risk synchronous model be default load… Continue reading Azure Service Bus – introduction