Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I filter the messages I receive from a message queue (MSMQ) by some property? (a.k.a. topic)

Tags:

msmq

I am creating a Windows Service in C# that processes messages from a queue. I want to give ops the flexibility of partitioning the service in production according to properties of the message. For example, they should be able to say that one instance processes web orders from Customer A, another batch orders from Customer A, a third web or batch orders from Customer B, and so on.

My current solution is to assign separate queues to each customer\source combination. The process that puts orders into the queues has to make the right decision. My Windows Service can be configured to pull messages from one or more queues. It's messy, but it works.

like image 976
Michael L Perry Avatar asked Sep 15 '08 16:09

Michael L Perry


People also ask

What is journal messages in MSMQ?

Journal Queues store copies of messages. After sending a message, MSMQ can put a copy of the message in the Computer Journal (MachineName\Journal$). After removing a message from the destination queue, a copy of the message is optionally sent to the Queue Journal (MachineName\QueueName\Journal$).

How does MSMQ queue work?

Message Queuing (MSMQ) technology enables applications running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues.


1 Answers

No, but you can PEEK into the queue and decide if you really want to consume the message.

like image 83
Esteban Araya Avatar answered Sep 30 '22 04:09

Esteban Araya