![]() (registrationContext => įor a consumer to receive messages, the consumer must be connected to a receive endpoint. would normally be in different applications ServiceCollectionConfigurator.AddConsumer() ![]() ![]() Var newOrdersQueue = "new-orders" // need to make sure the queue name is written correctly Var connectionString = "endpoint of your service bus" Public void ConfigureServices(IServiceCollection services) In the Controller folder of the Sender project add a new controller. Next thing we would be adding the code to send and consume message In that tab search for each of these packages and install them to Sender and Consumer projects. Right click on the project and select Manage Nuget Packages. We need to install several MassTransit related packages in addition to Azure Service bus. Next thing is to add several Nuget packages Or you can process it and send it further where you want to.Īdd a new web app project to this solution and select Empty template. In essence this is where our message would end up going. Now we need to add a Consumer or Receiver. Net Standard these would be able to share a particular class library without any issues. Net platform versions(.Net Framework 4.5 and. In other words if you got two projects of different. The reason why we add the class library of Net Standard is because it provides a uniformity in the. You can read a definition for it here or here. In the same solution add New Project and select Class Library (.Net Standard) This project will contain our Contracts. This project is going to be our Sender according to Microsoft resources or Producers according to Masstransit documentation. Open Visual Studio and choose ASP.NET Core Web Application. This could be an e-commerce website, an airplane or bus ticket ordering website. Let’s imagine a system where you can create a new order for whatever reason in the industry you like. The case study would be around the order system. In this post I will explain how to create a bus queue and consume it.
0 Comments
Leave a Reply. |