Java JMS mix messaging implementations

2019-09-04 05:37发布

问题:

Is it possible to use java messaging with mixed implementations.

E.g.: Is it possible to connect an ActiveMQ client directly to an MQSeries(IBM) server to read/write messages from/to the message queue?

回答1:

JMS is an API specification, not a wire format specification. JMS describes the signature of APIs. It does not say how the internals should be implemented. Hence JMS client library implementations are Messaging Provider specific.

A IBM MQ JMS Client knows how (i.e wire format) to communicate with IBM MQ. Similarly Active MQ JMS client knows how to speak to Active MQ JMS provider. Since the implementations are different, Active MQ JMS Client will not be communicate with IBM MQ.



回答2:

no, each client implementation is specific to broker, maybe only with client for amqp protocol if supported



回答3:

It is possible with the standardized wire protocols that both brokers support-- AMQP and MQTT, but as previous commenters noted it is not possible with JMS.