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?
Asked
Active
Viewed 1.2k times
11
-
Publishing messages to MSMQ is inherently synchronous (as in, the lowest-level APIs for it are synchronous), so any asynchronous API would be no more than a (probably inefficient) wrapper. Receiving can be done asynchronously, though. – Jeroen Mostert Nov 09 '16 at 20:32
-
So, is there another one that MS is hawking? I can't find anything on this. – Jeremy Holovacs Nov 09 '16 at 21:20
-
http://stackoverflow.com/questions/36721419/system-messaging-msmq-not-accessible-in-asp-net-core-1-0 – tom redfern Nov 09 '16 at 21:53
-
Yeah I saw that, but I don't want to be dependent on the .NET classic framework. I'm trying to build a platform-independent project. – Jeremy Holovacs Nov 10 '16 at 00:49
-
2The only platform-independent solutions MS offers are cloud based, like Azure Service Bus. If you want a platform-independent queuing system that you host yourself, you'll have to look elsewhere, like RabbitMQ, ZeroMQ, etc. However, I expect most of *those* not to have .NET Core bindings (yet) either. Quests for tools/libraries are off-topic on SO, so I'll leave it at that. – Jeroen Mostert Nov 10 '16 at 07:21
-
[MSMQ is dead](https://particular.net/blog/msmq-is-dead): "As Microsoft is not making MSMQ available for .NET Core, building new systems using MSMQ is not recommended." (https://docs.particular.net/transports/selecting) – Vladislav Apr 06 '20 at 11:03
1 Answers
12
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

Richard Dyer
- 136
- 2
- 4
-
3So let's say I wish to use the new MVC features and .Net Core dependency injection, but still wish to communicate via MSMQ. Is that not possible? I can see why it's not in the core framework, but it seems like I should be able to add some Windows-dependent Nuget package to the project to do this. – flodin Jun 21 '17 at 11:14
-
1
-
1This answer makes no sense because nothing would stop microsoft from adding dotnetcore bindings. Not in netstandard, but still you CAN add bindings. MSMQ since 2016 supports SOAP, so you do not even need to use native interfaces. https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms699792(v%3Dvs.85) – TomTom Jan 28 '20 at 10:38