4

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?

Urbanleg
  • 6,252
  • 16
  • 76
  • 139

1 Answers1

5

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.

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...).

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

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"/>
Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • i am facing similar issue . Here this works when sender is amqp and receiver is jms but the reverse is not working . i.e if sender is jms client than i am not able to listen this using amqp client. – gsagrawal Oct 20 '16 at 09:01
  • Would warrant asking a new question and showing what you are doing. – Tim Bish Oct 20 '16 at 15:37