WCF / WebService的作为侦听器MQ消息? [英] WCF / WebService to act as Listener for MQ Message?

查看:299
本文介绍了WCF / WebService的作为侦听器MQ消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我找错了树 - 但我有一组服务(的WebAPI和WCF)是使用WebSphere MQ与其他系统进行交互。

Perhaps I am barking up the wrong tree - but I have a set of services (WebAPI and WCF) that use WebSphere MQ to interact with other systems.

这工作没有问题 - 直到我现在需要找到一种方法聆听上一个队列的消息

This works without issue - until I now need to find a way of listening for messages on one of the queues.

这甚至可能,或者我需要下井Windows服务路线?

Is this even possible, or do I need to go down the windows Service route?

推荐答案

您的问题可以分解为两个不同的元素:

Your problem can be broken down into two distinct elements:


  1. 如何MQ与WCF支持的传输整合

  2. 如何在这个运输揭露一个WCF端点

要解决第一个问题,你应该看的 MQ-MSMQ桥附带的主机集成服务器截至2009年版本(非R2),它可以让你有传递到Windows转发到本地MSMQs的MQSeries队列中的消息。尽管此功能是<一个href=\"http://blogs.msdn.com/b/johnbreakwell/archive/2010/02/04/future-of-the-msmq-mqseries-bridge.aspx\"相对=nofollow>德$ P pcated 该$可能是,如果你有一个MSDN许可证的最简单方法。

To address the first issue, you should look at the MQ-MSMQ bridge which ships with Host Integration Server up to version 2009 (not R2), which allows you to have messages delivered to MQSeries queues forwarded to local MSMQs in windows. Although this feature is deprecated it's probably the easiest way if you have a MSDN license.

解决这个问题的另一种方法是使用附带的一个MQSeries适配器,但除非你正在使用当前在企业中的BizTalk我会避免的BizTalk Server。

Another way of addressing this issue is to use BizTalk server which ships with a MQSeries adapter, though unless you're using BizTalk currently in your enterprise I would avoid.

你可以这样做的最后的办法是直接针对的MQSeries .NET客户端库,或通过<一个编程href=\"http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.1.0/com.ibm.mq.msc.doc/xms_cgetstd_intronet.html?cp=SSFKSJ_7.1.0%2F4\"相对=nofollow> XMS 客户端。

The last way you could do this is to program directly against the MQSeries .NET client libraries or via the XMS client.

如果您管理首先要解决的问题,然后解决第二个是很容易的。您可以通过使用netMsmqBinding(WCF的两端)在暴露MSMQ传输的一种方式WCF服务业务,或msmqIntegrationBinding使用System.Messaging或本地MSMQ COM库的客户端。

If you manage to solve the first issue then solving the second one is easy enough. You can expose one way WCF service operations over msmq transport by using the netMsmqBinding (for WCF on both ends), or msmqIntegrationBinding for clients using System.Messaging or native msmq COM libraries.

这在效果作为一个听者的服务,与消息正在由业务操作处理。

This in-effect acts as a listener service, with messages being handled by the service operation.

这篇关于WCF / WebService的作为侦听器MQ消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆