If losing messages is ok a .NET Queue is fine.
If you want to persist them you could use a database.
If you want to handle priorities, have multiple instances consuming a message once, handle permissions etc... you could start to look closer at a message queuing system.
You can check the link that PatriceSc shared and
this link to know more about MSMQ. Besides, although the MSMQ is part of most Windows operating systems components, it is usually not installed as part of the default installation, so before using it we have to install it. If someone just want to store
a collection of objects in a queue for quick access, .NET Queue would be an easy and convenient approach.
With Regards,
Fei Han
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
324 Points
382 Posts
Why MSMQ is better than Queue type?
Nov 30, 2017 07:16 PM|Alex9|LINK
Hello all!
Why MSMQ commonly preffered than simple console app with Queue?
Thank you.
All-Star
48570 Points
18082 Posts
Re: Why MSMQ is better than Queue type?
Nov 30, 2017 07:32 PM|PatriceSc|LINK
Hi,
It's for more advanced scenario. See https://en.wikipedia.org/wiki/Message_queue#Usage for a list of features such as durability etc...
If losing messages is ok a .NET Queue is fine.
If you want to persist them you could use a database.
If you want to handle priorities, have multiple instances consuming a message once, handle permissions etc... you could start to look closer at a message queuing system.
All-Star
40565 Points
6233 Posts
Microsoft
Re: Why MSMQ is better than Queue type?
Dec 01, 2017 05:38 AM|Fei Han - MSFT|LINK
Hi Alex9,
You can check the link that PatriceSc shared and this link to know more about MSMQ. Besides, although the MSMQ is part of most Windows operating systems components, it is usually not installed as part of the default installation, so before using it we have to install it. If someone just want to store a collection of objects in a queue for quick access, .NET Queue would be an easy and convenient approach.
With Regards,
Fei Han