Push and pull models are in general approaches of distributing the data between services. In the context of messaging it mean how messages are received by the client. In the previous post I showed how to receive messages by waiting for them to come – this is pull model. Receive method will wait some amount of time… Continue reading Receive message from queue in push model
Month: April 2017
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
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
Getting Azure subscription
There are a couple of ways you can get access to Azure services. You might get it from work or with BizSpark program. However, if you want to get it for free, just go to Azure website and start a trial. After couple of minutes of configuration you will have full functional Azure environment with vast… Continue reading Getting Azure subscription