Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to publish messages asynchronously to MSMQ in .NET Core?

There doesn't seem to be a client available, or maybe I'm just looking in the wrong namespace. How is this expected to be done, or is the answer that I have to find another message service?

like image 676
Jeremy Holovacs Avatar asked Nov 09 '16 20:11

Jeremy Holovacs


People also ask

Is MSMQ asynchronous?

Asynchronous messaging. With MSMQ asynchronous messaging, a client application can send a message to a server and return immediately, even if the target computer or server program is not responding.

Is MSMQ supported in .NET core?

As noted above, one of the defining characteristics of MSMQ was its support of distributed transactions, which aren't supported in . NET Core.

What is messaging queue in C#?

Message Queuing is a message infrastructure and a development platform for creating distributed messaging applications for the Microsoft Windows Operating System. Message Queuing applications can use the Message Queuing infrastructure to communicate heterogeneous networks and with computers that may be offline.

Why do we use MSMQ?

Message Queuing (MSMQ) technology enables applications running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues.


1 Answers

MSMQ is part of Windows/Windows Server and is therefore not platform independent and part of vanilla .NET Core. If you want the System.Messaging framework, you need to target the .NET Framework. It's been a little confusing getting to this point but this is a good example of the inherent differences between the two in the new Microsoft world.

For Microsoft's explanation, please see https://learn.microsoft.com/en-us/dotnet/articles/standard/choosing-core-framework-server

like image 99
Richard Dyer Avatar answered Nov 05 '22 12:11

Richard Dyer