question

ItamarKasztelanski-9349 avatar image
0 Votes"
ItamarKasztelanski-9349 asked LimitlessTechnology-2700 answered

MSMS outgoing Queue has a large number of unprocessed messages

Hi,
I have a server with MSMQ running.

In send messages to other servers. Not all the are active all the time.

Messages are stuck in the outgoing Queue until the target server up and responding.

I have a task that clears all the non-active outgoing queues.

The have some outgoing queues that show they have 1700 messages the majority are in the unprocessed (msqs).

When I try to purge the messages manually or the admin console, I see only one or two messages.
When I run the PowerShell command, I get UnprocessedMessageCount: 1788 and BytesInQueue : 4541616.
I am unable to clear the messages with PowerShell command.

Is there a way to clear these messages, they are taking a big part of the server's MSMQ storge?

Thanks

Itamar






The cleanup comma

windows-server-2016
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi there,

You can try out these approaches ,

  1. In computer management, go to the security properties of the queue, take ownership through the Advanced button, and set permissions to what you want.

  2. Find the queue config file in the system32\msmq\storage\lqs directory and delete the file; the queue name will be inside the file you want. When you restart the MSMQ service, the queue will have disappeared.

The Clear-MsmqQueue cmdlet clears queues. Specify queues to clear by using MessageQueue objects. This cmdlet returns a MessageQueue object that represents the cleared outgoing queue.

PS C:\> Get-MsmqQueue -Name "Order*" | Clear-MsmqQueue



--If the reply is helpful, please Upvote and Accept it as an answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.