title: .NET Core Microservice using RabbitMQ
body: <p>I am planing to use Microservice architecture for a project. The selected technology stack is <code>.NET Core</code> with <code>Docker</code> and <code>RabbitMQ</code> as a simple service bus and this should be able to deploy on <code>Linux</code>.</p>
  
  <p>Lets say I have a <code>Payment</code> service and an <code>Order</code> Service, I want each of these services to expose <code>REST</code> endpoints. Because of that, I thought of making these two services as <code>.NET Core Web APIs</code>. </p>
  
  <p>But the problem is the inter-service communication using <code>RabbitMQ</code>. Whenever I get a new <code>order</code>, I want to publish an event using <code>RabbitMQ</code> and then listen to that event in <code>Payment</code> service to perform certain operations (database updates). But since these are <code>Web APIs</code>, I don't think it's possible to listen to events as I described. (I feel like I might have to use something like a console application to subscribe to events.)</p>
  
  <p>I would like to find the most viable method to achieve this using the best practices considering the scalability and extendability of the system.</p>