CodingHero
CodingHero

Reputation: 173

Receiving MessageQueue msgs without reading them from the receiving Queue?

I am using the System.Messaging.MessageQueue to send and receive multicast System.Messaging.Message’s on my LAN – this works fine.

However, I have a requirement to receive the msgs without using a message queue.

As the MessageQueue uses the PGM protocol (113) to send messages I am trying to build a type that listens on PGM (protocol 113) using a socket (e.g. new Socket(AddressFamily.InterNetwork, SocketType.Rdm, (ProtocolType)113);). The type is receiving message data but it is in a text format (with a soap formatter section -see example this example on msdn http://msdn.microsoft.com/en-us/library/cc219170.aspx)

I obviously want binary data so i can cast it into a System.Messaging.Message and get at the real data.

Any ideas on how i can do this are greatly appreciated .

Upvotes: 1

Views: 717

Answers (2)

Noon Silk
Noon Silk

Reputation: 55082

You can just peek at them? The MSMQ supports that functionality. Or are you just trying to read messages on queues you don't typically listen on?

Upvotes: 0

Libor
Libor

Reputation: 105

If you are looking purely for PGM use on MS Windows then Emcaster is very good info source with example how to use it.

But if you are looking for more mature solution with broader range of capability then nServiceBus framework should be your choice.

Upvotes: 1

Related Questions