WCF: msmqIntegrationBinding

October 22, 2008 at 8:31 pm (.net 3.5, Visual Studio .Net 2008, WCF)

Today I discovered the msmqintegrationbinding in the windows communication framework.

This binding is especially to allow wcf services to process message that are put in a message queue by some legacy program. The advantage of this is that you can do this without the need to change the legacy client.

If you want more information on how to use this binding have a look at this post at Simon Evan’s blog

There was something I liked in particular and it was exactly what I was looking for; I’m working on a custom logging framework adapted to our needs. To keep it simple let’s say that a Log class sends messages using the fast netnamedpipebinding in wcf to a service. This works fine, but what when the service is unavailable? Well I’ve designed the Log class to automatically failover sending the message it would normally send to the service to a queue. This way I don’t lose any of the log messages. The advantage I mentioned above is that when I reset the service (launch it again) it automatically starts processing the messages (logs) in the queue as well as accepting new log messages using the named pipes. So this way I achieve our main priority: deliver the log messages as fast as possible, but without losing them when the service is down.

1 Comment

  1. Raj said,

    December 26, 2008 at 2:44 pm

    Hi,
    I was just reading your blog and I got to know on MSMQIntegrationBinding which you have implemented in your project. I am trying simillar things using windows Service which listen to MSMQ Queues but it is not working.Please let me know if you are intrested in this.

Post a Comment