Click here to Skip to main content
15,888,008 members
Everything / MSMQ

MSMQ

MSMQ

Great Reads

by Yuriy Magurdumov
This article describes more scalable implementation of MessageQueue.ReceiveByCorrelationId method.
by Gil.Schmidt
How to move a wcf msmq message from an outgoing queue to another outgoing queue.
by David Combrinck
Quick overview and sample running a full .NET Framework 4.6.1 console app inside a Windows container, reading and writing from and to MSMQ queues.
by Deependra Sampang
Usage of WCF for sending messages, WAS binding of MSMQ message queue for processing of messages, fail-over set up for MSMQ server

Latest Articles

by _Asif_
Access rights issue over MSMQ could lead to hours and hours of investigation
by David Combrinck
Quick overview and sample running a full .NET Framework 4.6.1 console app inside a Windows container, reading and writing from and to MSMQ queues.
by Yuriy Magurdumov
This article describes more scalable implementation of MessageQueue.ReceiveByCorrelationId method.
by Deependra Sampang
Usage of WCF for sending messages, WAS binding of MSMQ message queue for processing of messages, fail-over set up for MSMQ server

All Articles

Sort by Updated

MSMQ 

7 Jan 2022 by Jeankininho
My problem is little confusing, I have 2 servers (Windows Server 2008 R2) with MSMQ installed and I want consume a MessageQueue are in Server A from Server B, but when I try to Receive always throw a message error: "Access to message queuing system is denied.".IP between them.Server A:...
21 Jan 2021 by Christian Graus
No one can give you a definite answer because your question is vague. What is the task? You need to break the task into atomic parts so different threads can work in isolation
2 Nov 2019 by RickZeeland
Here's an example for Powershell: Get-MsmqOutgoingQueue -Name "Order*" | Clear-MsmqOutgoingQueue For more information, see: Clear-MSMQOutgoingQueue[^] And here is a more radical example that deletes all queues: Delete all MSMQ queues · GitHub[^]
2 Nov 2019 by Member 14641633
Hi, We want to make disappear the outgoing message queues to be sure that our app wouldn't use them anymore. If Outgoing Message Queues are temporary, when does it disappear from compmgmt.msc when they are suspended and cleared, and the application only uses local message queues afterword? Is...
19 Jul 2019 by Aman Bhullar
Hi, I have a requirement to get the disk used by the message queue in C# as incoming volume of queue is very high. Is there any way to get MSMQ disk usage. What I have tried: I have found way to get number of messages in queue, but nothing on size of queue.
19 Jul 2019 by phil.o
MessageQueue class has a GetAllMessages() which returns an array of Message instances. Once you get this array, initialize a counter variable to zero. Then loop through all messages in the array, and use the BodyStream property of the Message instance to get a reference to the underlying stream....
22 Apr 2019 by _Asif_
Access rights issue over MSMQ could lead to hours and hours of investigation
27 Feb 2019 by David Combrinck
Quick overview and sample running a full .NET Framework 4.6.1 console app inside a Windows container, reading and writing from and to MSMQ queues.
7 Dec 2018 by Yuriy Magurdumov
This article describes more scalable implementation of MessageQueue.ReceiveByCorrelationId method.
12 Oct 2018 by John Whitmire
I have a local MessageQueue with sender and receiver being in the same application (a delayed-start Windows service using .NET Framework 4.0). An asynchronous read is always pending on the queue, reissued after every completed read or read failure. Typically, a message is placed in the queue and...
28 Mar 2018 by Christiaan van Bergen
Use something that keeps on listening. The Receive method on a MessageQueue will do that. For example: var mq = new System.Messaging.MessageQueue(@".\Private$\SomeQueue"); while (mq.CanRead) // or any other loop condition { var msg = mq.Receive(); //do something with your message here...
28 Mar 2018 by Member 11837253
I am first time working with both windows service and MSMQ. I am trying to read messages from queue. When I start my windows service, i am receiving only first message and next message not able to read, service is still running. if I restart the service It is reading first message from the...
15 Mar 2018 by Member 11837253
I am sending a message from my windows application to a private queue, which is working fine. Now I am trying to set time expiry before sending the message from windows application. Also how long will msmq message stays in queue? 4 days? What I have tried: I tried this, not even sure if it is...
3 Nov 2017 by i_syed2000
I'm trying to understand the concept of transaction messaging on MSMQ as well as transaction support in wcf. For Queues with transaction support, does it mean the following set of operations will be automatic? 1. Client A on Machine 1 writes a row in its application database that message sent...
3 Nov 2017 by Mehdi Gholam
Read the definition : [^] If you read/write to a message queue and do other operations in a transaction, they will all succeed or fail/rollback (so for the queue no enqueue and for writes and no dequeue for reads, and databases commit or rollback etc.).
5 Sep 2016 by aliwpf
hi there . you can use WCF with msmq binding. soap with mtom . because wcf support cross platform.
2 Jun 2016 by Chaithannya
Suppose I have an email id info@xyz.com. I want to redirect all the emails send to this address or sent from this address to my message queue(eg: @".\Private$\MyQueue") . How can i achieve that?What I have tried:I have tried sending and receiving using two forms but actually i want to...
2 Jun 2016 by Dave Kreskowiak
You would have to write your own email server, supporting IMAP, POP3 and SMTP, that does this. The clients would have to connect to this email server, where you'd do your processing and formatting for a MSMQ message and queue this object up.For incoming mail, this server would have to be...
22 May 2016 by Dzianis Igaravich Leanenka
Hello to everyone!I have to implement a so called message queue program based on REST WITHOUT using any extra libraries or ready implementations as RabbitMQ , MSMQ and so on (but should be similar).I just need a few comments and lines of code (C# , C++ , Java) to realize how it should work....
22 May 2016 by KarstenK
Her are some lines of code as principle solution:while( !isQueueEmpty() ) { Msg *msg = getMessage(); if( msg->send() == OK ) { RemoveMsgFromQueue(msg); }};I hope you get it ;-) (that the answer is at the same level as your question)tip: But it makes no sense to...
6 May 2016 by s23user
I new to this. I have never tried this before. I have this querystring queryString = String.Format(@"SELECT * FROM Win32_PerfFormattedData_msmq_MSMQQueue"); var query = new ObjectQuery(queryString); var searcher = new ManagementObjectSearcher(scope, query); ...
6 May 2016 by s23user
just added query path and formatted it correctly :int pos1 = queuePath.IndexOf('\\'); int pos2 = queuePath.LastIndexOf('\\'); string qPath1 = queuePath.Insert((pos1 + 1), "\\"); string qPath = qPath1.Insert((pos2 + 1), "\\"); string queryString =...
4 May 2016 by s23user
How do I get the name of the queues with only messages and how do I count the number of messages on each queues which has messages and how do I print message body in console application?What I have tried:var q = MessageQueue.GetPrivateQueuesByMachine(machineName);Now this will give...
4 May 2016 by Sergey Alexandrovich Kryukov
MSDN help page provide comprehensive information on MessageQueue; you have all you need to solve your problem:https://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.getprivatequeuesbymachine%28v=vs.110%29.aspx[^],MessageQueue Class...
25 Mar 2016 by Vikas Hire
I going to developing an application which required communicate with other remote applications. I don't know how to retrieve Message text from queue.What I have tried:I am going to developing an application(Email & SMS Scheduler) that installed on server. I want to by using that...
25 Mar 2016 by Garth J Lancaster
check out Programming MSMQ in .NET - Part 1[^]and How to send and receive messages in MSMQ using C#/VB | BizTalk: Notes from the field[^]
11 Feb 2016 by Deependra Sampang
Usage of WCF for sending messages, WAS binding of MSMQ message queue for processing of messages, fail-over set up for MSMQ server
20 Oct 2015 by Mangesh9692
After lots of research i found perfect solution for this.When you install MSMQ for winodws their are two different mode available for installation one is workgroup other one is domain.Please install MSMQ in domain mode when your machine in domain or install MSMQ in workgroup mode when...
12 Oct 2015 by Mangesh9692
My asp.net stie uses message queue to transfer and receive messages,but my site giving error that Access to message queue is denied.What could be possible reasons for this,Note-1)My current user have full administrative access.2)I also tried giving permission manually to...
9 Jul 2015 by Member 11827170
Hi,I've a question: In case of multiple consumers (identical service) are listening/receiving messages from the only one MSMQ queue, do I need to lock the queue on Receiving message? To make sure that a message was processed only once.In the other words, is it possible if two instances...
7 Jul 2015 by virusstorm
Task Scheduler[^]How to: Create Windows Services[^]And a personal favorite that I've implemented in an enterprise settingA beginner's guide to queuing with WCF and MSMQ showing bi-directional client correspondance[^]
7 Jul 2015 by Sagar Kute
I have a scenario where I have to insert records in MSMQ from one application and after some interval retrieve from MSMQ and insert into DataBase(DB) by another application (like .exe file or any service).I have executable file which reads and insert all records from MSMQ to DB which repeats...
19 May 2015 by Member 8757025
Hi All,I have a sample wcf msmq service as shown below.[ServiceContract] public interface IService1 { [OperationContract(IsOneWay = true)] void SendCreditLimitRequest(string id); } public class Service1 : IService1 { public void...
26 Feb 2015 by aayzz
I work on a real WCF/MSMQ project to handle concurrency/queued!! calls from different clients, and I choose InstanceContextMode.PerSession and ConcurrencyMode.Multiple for WCF Intancing and Concurrency modes, and MessageQueueTransaction.This the requirement of the project: - Clients send...
6 Feb 2015 by Member 11434122
I am using message queue send task to send message to msmq. Along with the message body it shows extra fields like: '{845F7BF8-F4F0-4B20-9527-0CAAF59CB4DF}';'User::vMessage';'String';'';Is there any way to keep just the message. Also can we set the label of the message externally since by...
1 Nov 2014 by George Jonsson
Your question is very general, so you get a general answer.Start with reading about Microsoft Message Queue here: Message Queuing (MSMQ)[^]then continue to read about WCF here: Windows Communication Foundation[^]Here is info how to use WCF and MSMQ together: Queuing in WCF[^]This is a...
1 Nov 2014 by singh.ashish92
How to read msmq message type from the other server using wcf.
29 Jun 2014 by arjun(orville)
I have a WCF Windows Service that retrieve MSMQ messages. The SubmitPurchaseOrderInMessage doesn't seem to get called neither do I see any messages in the queue. Code is shown below. WCF class: public class OrderProcessorService : IOrderProcessor { ...
29 May 2014 by Maryam_Majedi
Hi everyone, Does anybody know how can I access a private queue on a virtual machine?I am using c# .Net 4. I tried using MyQueue= new MessageQueue(@"MachineName\Private$\queuename); and used the ip address for the MachineName in order to connect but I get an error saying "invalid queue...
3 Apr 2014 by W.Walker
Hello Rajeev Kr Bhardwaj,Take a look at my article: How to build a basic IVR (Interactive Voice Response) menu system in C# to improve your call center[^]I hope it helps you!Best Regards, Will
29 Jan 2014 by Dusara Maulik
Hi,IVR Integration Developer Sample (C#)[^]http://www.voiceelements.com/products/vetoolkit.aspx[^]IVR applications based on Voicent Gateway (C# Sample Interface)[^]TAPI 3.0 Application development using C#.NET[^]
29 Jan 2014 by Mohamad M. Mohamad
Have you tried this[^]?
29 Jan 2014 by Rajeev Kr Bhardwaj
Dear All,I want a develop an application on IVR. Can anybody let me know what pre-requisite software / application required?OR how can I start development an IVR Application using C# (VS.net 2010)?My objective is; Record incoming / outgoing calls In case of incoming call, a sender...
12 Jan 2014 by Michael Trembovler
The current article might be useful for users attempting to use NServiceBus. It contains detailed instruction for creating pairs: publisher-subscriber through ServiceMatrix. Solution architects may find this technique useful in many CQRS scenarios as a good alternative to WCF.
30 Dec 2013 by nrgjack
basically you need 1 - something that enqueues requests 2 - something that reads the queue and processes the requests. 1) to enqueue request you can make a WCF service, so you can have a "client" that sumbit request using that service. 2) to read the queue you can create a...
30 Dec 2013 by sutotpal
Hi Frnds,anyone can help me to provide sample code or Steps to implement webservice with MSMQ .I have already installed msmq in my server . Thanks
18 Dec 2013 by sheik Md
Try This Link It May Help youhttp://www.codeproject.com/Articles/7045/MS-SQL-Server-mail-queuehttp://www.emailarchitect.net/webapp/smtpcom/developers/queue_msmq.aspsheikwww.jobpencil.com[^]
18 Dec 2013 by Prabu Spark
Hi, I want to email in queue process(one by one) using msmq. So kindly give me the solution for this problem.
14 Nov 2013 by ArunRajendra
Try this links. Hope this is what you want.http://msdn.microsoft.com/en-us/magazine/cc163537.aspx#S2[^]http://stackoverflow.com/questions/5739501/how-can-a-wcf-service-raise-events-to-its-clients[^]
14 Nov 2013 by ExpertITM
I have application in wpf.application is checking new data for every one min.Now we are maintainign this interval minutes from web site and user can change the interval time from website.Now I want to change that interval time to the application running on client's pc when change from...
29 Oct 2013 by Jeankininho
After many hours and much sweat HALLELUJAH.The answer is:In "Server Manager">"Features"> Right click in "Message Queueing">"Properties">Tab "Server Security" and disable the option "Disable un-authenticated RPC calls".
26 Sep 2013 by Balamurugan1989
Refer This Link:http://stackoverflow.com/questions/40296/what-is-the-best-free-tool-for-managing-msmq-queues-and-messages[^]
26 Sep 2013 by Mehdy Moini
Your want to use console.WriterLine() for writing in browser? it is wrong!Use Response.Write()
25 Sep 2013 by Member 10102675
Hello,Below is the code I have written to display the contents of an MSMQ queue. It works fine in case of winforms. But When i create a web application, Though the queue has some data, Nothing is displayed.Can u help me..?Thanks in advance.using System;using...
23 Sep 2013 by Member 10102675
Hello every one,I have written a code which reads and writes from the MSMQ.Now I'am able to display the contents of the queue in a grid view. But my task is to display the same contents on a web page via IIS.Can anyone guide me?Thanks a lot in advance :)
17 Sep 2013 by Mehdy Moini
Imagine one thread is completed and another thread is not, so thread one, after endReceive , will delete the file when second thread have a message queue with a file name which doesn't point to a file, because first thread delete that.
16 Sep 2013 by Jeankininho
HiBasically, I'm using the class of .Net MessageQueue, I send a Message with FileName to a Queue, but I've received many errors from the Machines that consume the Queue like "File doesn't exist" or "FileNotFoundException". The machines supposed to delete the files.If someone familiar...
29 Aug 2013 by Member 10240213
hi,Is there any way to create a public message queue on a remote machine? I've tried:MessageQueue.Create(@"FormatName:DIRECT=OS:remotemachinename\nameofqueue"); Which gives the following error "Cannot create a queue with the path...
10 May 2013 by Bruce Bennett
Comparing the different methods of counting messages on a MSMQ
22 Mar 2013 by Rohit Kumar Mumbai
To achieve this you have to mark the messages as Recoverable. By default, MSMQ messages are only held in memory, but Recoverable messages are backed to disk to enable reliable MSMQ Messaging.using System.Messaging;Message recoverableMessage = new Message();recoverableMessage.Body =...
21 Mar 2013 by saumil.sapariya
I've created a public queue and sent some messages to the queue using a windows service application. The sending application executes on the same server as the queue (i.e. this is a local queue). After restarting the server, all of the queued messages were purged. Is there any way to persist...
31 Jan 2013 by Art Corcoran
To nanomass,If you can't see the "Public Queues" folder in Computer Management, then you haven't turned on the windows feature "MSMQ Active Domain Services Integration". Once you've done that, you need to exit and re-enter Computer Management to see the "Public Queues" folder.-- Art
27 Jan 2013 by Anurag Sinha V
Hi..first of all..what is selfHosting??You can start with creating a WCF service first using the templates in Visual Studio.1)Add DataContracts, which mean what kind of data you wana expose, the datatypes and stuffs..2)Add Service and Operation Contracts, which will have your methods and...
27 Jan 2013 by pradeepdg
Hi all,I want to create a wcf web application, with MSMQ Queue messages with selfhosting and netMsmqBinding... Please help me to do it........Thanks,
13 Jan 2013 by Ger Hayden
I expected the answer to be in using SoapDataFormatter or DataContractSerializer to a memory stream would be the solution and deserialize on the other side. But no. If the service wants to do anything with the stream, the type e.g. DB_Person.CPerson trips it up - and yes I remembered to...
10 Jan 2013 by Ger Hayden
Unable to cast object CPerson to ServiceReference.CPersonCPerson is defined in its own assembly and is referenced throughout my application.This is an extract form how my the contract on my Central Message Distribution Service is defined: [ServiceContract( Name =...
28 Nov 2012 by Ger Hayden
Pilot error in the app.config....................
27 Nov 2012 by Ger Hayden
I have an exploratory application that I am working on where the service has been reading messages from its client of a queue (using MSMQ). I have expanded this to include a contract on the client side and an associated queue which would allow the service to respond to the client still using...
6 Nov 2012 by jim lahey
For the client I'd definitely look at using WCF:http://blogs.msdn.com/b/motleyqueue/archive/2009/05/31/msmq-and-wcf-getting-started.aspx[^]There is a dedicated binding for MSMQ and it's pretty easy to implement. For the server side you could use WCF again, or there's an...
6 Nov 2012 by Millayee
i have an application which have a server side and client side i want all the clients to send their messages to their queue and waiting to the server to be online and the server will fetch the clients message from their queue. can anyone have an idea on this and give me sample?millayee
27 Sep 2012 by atamata
Background: I'm an MSMQ novice and am having to support some legacy VB6 windows services; one on MachineA which sends SQL insert statements to a transactional public queue on MachineB, and another service on MachineB which consumes the messages.We had one queue set up and working just fine,...
21 Sep 2012 by Sandeep Mewara
Pretty strange, similar question asked by two persons at such a close interval:MSMQ: Acknowledgments not returned when delivering to a remote queue[^]
21 Sep 2012 by Sandeep Mewara
Based on similar discussion here[^], re-install message queueing on both machines and see.
21 Sep 2012 by NimiShabu
I get message in the remote queue but no acknowledgement received in local administration queue.
21 Sep 2012 by Mehdi Gholam
You can create public queues only if you have administrative permissions on the target server.And please do not repost : Create public queues on remote machine[^]
21 Sep 2012 by Nikhil Paulson
Can i create public queues on remote server ?
21 Sep 2012 by Rajeevk007
Acknowledgement message is not received in the administration queue after the successful receive of message in the remote private queue.
21 Sep 2012 by Rajeevk007
How to verify message delivery using administration queues?
21 Sep 2012 by Mehdi Gholam
Read the following :http://stackoverflow.com/questions/1352727/ensure-verify-message-delivery-using-msmq-c[^]Creating a WCF Service with MSMQ Communication and Certificate Security[^]
16 Sep 2012 by AmitGajjar
Hi,I found one article, Here it is.[^] This is about Querying MSMQ using LINQHope it works for you.
16 Sep 2012 by NimiShabu
I have a private queue, when I send message to that queue I assign certain label name. So whenever I need to fetch that MSMQ I can filter out based on label name.Is there any way to filter those message based on label name from .NET code.
10 Aug 2012 by AmitDey
Hello,I am trying to read some messages from MSMQ using NetMSMQBindingI keep getting the following exception. Can someone point me how I can resolve this.Please let me know if I need to share any more details.The SecurityMode is...
31 Jul 2012 by jschell
-- 1) Is it possible?Yes.-- 2) Will the applications which are reading this Queue also require some change?Absolutely.-- 3) How complex or difficult will this be?Depends on what the queue does.-- 4) Can someone give an overview of steps which need to be followed to achieve...
31 Jul 2012 by Apar Mathur
Hi,I am working on a VB6.0 to VB.Net migration project. Also currently there is an IBM MQ setup to which the VB6.0 application connects in the output mode and then puts messages in the Queue which I believe is in xml format.We also have a requirement of getting rid of this IBM MQ and...
18 Jun 2012 by nileshinfotech84
I have a private queue, when I send message to that queue I assign certain label name. So whenever I need to fetch that MSMQ I can filter out based on label name.Is there any way to filter those message based on label name from .NET code.
15 Mar 2012 by Zoltán Zörgő
A complete solution of how to build a simple mail relay application using MSMQ
15 Mar 2012 by Mohammad Sepahvand
Implementing a Simple, Secure WCF Service with MSMQ Communication
28 Jan 2012 by Gil.Schmidt
How to move a wcf msmq message from an outgoing queue to another outgoing queue.
28 Jan 2012 by jschell
You don't explain what the "trouble" is exactly.If the problem is with naming the queue path then I suggest the following links and read them very carefully. Then determine the best paths for your enterprise use. Note that some paths REQUIRE Active Directory at all...
27 Jan 2012 by nanomass
Hi,I have been trying to peek messages, and get the label from queues in a remote computer that I have sest up as a Virtual Machine. I have been having a huge troublegetting the access to work, and I have been researching all week and I haven't found in a concrete way how to set up he...
26 Jan 2012 by Espen Harlinn
Your virtual machine is probably not part of a domain, so you'll get no public queues.One way to work around the "Access to MSMQ messaging system denied" problem is to access some folder on the computer hosting the private queues using file explorer. It has to be a folder that requires you...
23 Jan 2012 by nanomass
Hi. I am trying to test my .dll on remote computers. Since I have only 1 machine I used Windows Virtual Machine, to simulate a machine; However my MSMQ service in the Virtual machine has no public queues(doesn't have the folder named "public queues"). For the sake of my testing, I did...
19 Jan 2012 by Dave Kreskowiak
If you only have the single machine to use you have no choice but to use a virtual machine to do this testing.Get used to the idea. You should be using VM's alot to do any testing of your applications before you deploy them.
19 Jan 2012 by nanomass
Hi community. I want to ask the following question. I have developed a MSMQ application in C# that is suppse to be able to post messages in a remote computer, and be able to peek the messages in remoe queues. My question is, how can I test this application in a single computer? I...
15 Dec 2011 by saurabh040488
Hi,I am currently working on a process where, we read swift messages from the IBM Wegbsphere Messeaging queues and convert the messages into files, and finally imports the files using a third party vendor tool(the code for which is not in our control). So, what we need here is something that...
12 Nov 2011 by RaisKazi
WCF can work as a listner to MSMQ messages using netMSMQBinding without any support of any other mechanism like Windows Service etc.Sometimes it is preferred to keep MSMQ on both Servers Sender and Reciever, Considering in case if Reciever Server is down then you will have your messages in...
12 Nov 2011 by Jyothikarthik_N
Currently, to allow concurrency and load balancing while accessing a resource on server,An WCF Service is implemented over MSMQ.Not MSMQBinding, but Just MSMQ.Client Writes content as Messages on Server's MSMQ queue.A Windows Service on Server listens to the queue.Upon receiving a...
3 Nov 2011 by knuckledragger
MQSendMessage throwing exception for simple "hello world" example. I am trying to write a simple send/receive for a private queue, nothing fancy.(non-transactional, events, etc) just simple strings. Queue is created successfullycode:int sendMsg(std::string message, QUEUEHANDLE...
29 Sep 2011 by RaisKazi
Have you initialized mq object of System.Messaging.MessageQueue?Have a look at below link for more information on MessageQueue Class.http://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.aspx