AMQP& Openwire-Activemq经纪人和2个不同的消费者 [英] AMQP & Openwire - Activemq broker and 2 different consumers

查看:137
本文介绍了AMQP& Openwire-Activemq经纪人和2个不同的消费者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个activeMQ代理,它同时支持amqp和openwire. Openwire的生产者(TCP,端口61616)是否有可能生产到具有使用amqp协议的使用者的队列?

I have an activeMQ broker that supports both amqp and openwire. Is it possible that a producer of openwire (tcp, port 61616) will produce to a queue that have a consumer that uses amqp protocol instead?

或者我仅限于相同的协议消费者和生产者吗?

or am i limited to the same protocol consumers&producers only?

推荐答案

是的,可以使用ActiveMQ与OpenWire JMS客户端和AMQP客户端进行互操作.保存消息的目的地不是单独的空格,因此,一种类型的客户端将消息放在队列中的位置可以由其他协议的客户端消耗.

Yes, it is possible to interoperate with the OpenWire JMS client and an AMQP client using ActiveMQ. The destinations that hold the messages are not separate spaces therefore message place on a Queue by a client of one type are consumable by a client from some other protocol.

您唯一需要面对的就是如何将实际消息传达给每个客户. ActiveMQ提供了一个可配置的Transfomer,它可以保留从AMQP客户端发送时AMQP消息的原始字节,也可以将该消息转换为更具JMS样式的消息对象,OpenWire客户端将以预期的类型(TextMessage,BytesMessage, MapMessage ...).

The only thing that you have to contend with is how the actual messages are conveyed to each client. ActiveMQ provides a configurable transfomer that can either preserve the original bytes of the AMQP message when sent from an AMQP client or transform that message into a more JMS style message object that would be received by the OpenWire client as the expected type (TextMessage, BytesMessage, MapMessage...).

有关配置方面的帮助以及理解AMQP到OpenWire消息的映射,请参考ActiveMQ文档.

Refer to the documentation of ActiveMQ for help in configuration and in understanding the mappings of AMQP to OpenWire messages.

http://activemq.apache.org/amqp.html

如果您想最轻松地处理转换消息并始终以正确的JMS类型到达OpenWire客户端的情况,请选择如下配置的JMS Transformer:

If you want to easiest to handle scenario where messages are transformed and always arrive at the OpenWire client as proper JMS types choose the JMS Transformer in configuration like so:

<transportConnector name="amqp" uri="amqp://localhost:5672?transport.transformer=jms"/>

这篇关于AMQP&amp; Openwire-Activemq经纪人和2个不同的消费者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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