Erik Mayo
unread,Jun 17, 2023, 10:25:17 AM6/17/23You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have Windows 11 Pro. Enabled MSMQ a while back and it had been working for a while. I developing and testing code that puts messages and reads from the queues.
After a recent windows update, each time the laptop reboots MSMQ disappears from the Computer Mangement >Services and Applications. In Services, Message Queueing is still running, but trying to stop takes a while and eventually it fails. When looking at "Turn Windows features on or off" MSMQ is still enabled. I have no option but to turn it off, reboot and turn it back on. But my queues (and messages) are gone.
When I restart with MSMQ back on, I recreate the Queues and run code to add messages. Everything looks fine even when I restart the code and messages are still there. After refreshing Computer Managment a couple of times the Outgoing Queues get entries for each of my queues "DIRECT-OS:... - Error: The queue is not open or may not exist." The code still works and can still access the messages. A reboot causes the same problem of loosing MSMQ, the Queues and messages.
I did some research and found a few mentions of similar issue from a few years back but not really had the answer. I found one that mentioned (Microsoft KB Archive/827493) using PurgeInconsistentQueues setting on registry. I did this and that solved the MSMQ getting hung, and Queues disappearing. The messages still get lost after reboots. Also the Outgoing Queues
I found a conversation in this group that mentions the same problem. The message was on OCT-2008. It mentions setting msg.delivery = 1 ' MQMSG_DELIVERY_RECOVERABLE. Looking at the code msg doesn't have this property, In C# the code looks like this:
var myQM = new Message
{
Formatter = new XMLMessageFormatter(new[] { typeof(myAppQMsg) }),
Priority = 1,
Recoverable = true,
Body = xAppQM
};
outQueue.Send(myQM);
That code has been working for years. And it was working on my Dev laptop until recently. Any clues? I appreciate the help.
Thanks
Erik