Reputation: 1935
I have a wcf service that executes some code and sends a message to the IBM WebSphere MQ hosted on a linux server. I can put and get messages from the queue just fine. What I wanted to know that is there a way by which whenever a message is sent to the queue a listener service (WCF) activates to process those messages? (this can be done by using netmsmqbinding and WAS for MSMQ)
I have researched a lot but was unable to find any code examples which made me think that is this even possible....
I have looked at some answers but they don't link wcf and mq part. A similar question is WCF / WebService to act as Listener for MQ Message? but there is no concrete answer. I have also looked at Listening to new enqueued messages using WCF Service.
So this scenario lead me to think that my only option is to write a windows service that after some interval listens (polls i.e invokes the get method on) the queue or write a console application that does that same thing.
Does anyone have a more elegant solution?
Upvotes: 1
Views: 600
Reputation: 1830
Triggering might be an option. WebSphere MQ can start an application when a message arrives on a queue:
http://www-01.ibm.com/support/docview.wss?uid=swg27020075&aid=1
As you want to trigger an application not running on the server of the queue manager, you will need a trigger monitor like this:
http://www-01.ibm.com/support/docview.wss?uid=swg24000149
Upvotes: 2