Java / Python communication via message broker

What is a good solution for communicating through a message broker that supports (c) Python and Java / JMS applications? My specific requirements are:

>Open Source Solutions > available on Linux Based Systems > no need for convergence between sender and receiver (i.e. using message broker) > multiple producers and consumers supporting a single event queue (only one consumer receives each message) > work support unit with two-stage submission (XA support is good) > support persistent messages (i.e. survive broker restart) >JMS supporting Java clients > no components are "edge", which means the risk of exiting maintenance due to lack of community support / interest > If a python client tries to "say JMS", it will be awesome, but the answer including the task of writing my own Python JMS layer is acceptable

I had a wonderful time finding a solution Apache's ActiveMQ does not have Python support out of the box Zeromq needs a rendezvous Rabbitmq does not seem to support JMS The best candidate I found was a combination of ActiveMQ and pyactivemq libraries However, the first and last versions of pyactivemq were in 2008, so it doesn't seem to meet my "no edge" requirements

The ideal answer would be the name of one or more well supported and fully documented open source packages that you have personally used to communicate between Java / JMS and python applications without requiring a lot of integration work to get started Answers including "easy" (up to a few days of work) will implement additional glue code to meet all the above requirements and will be acceptable Commercial solutions without a good open source candidate are also acceptable

Besides, Jython has come out (if only I can...) the same Python application will need to use modules that are only available in Cpython

Solution

ActiveMQ broker fully supports using stomp protocol out of the box Stomp is a text - based messaging protocol with clients in many platforms and languages

ActiveMQ documentation should contain information about how to set up the connector In its simplest form, enabling connectors would be similar to:

<transportConnectors>
   <transportConnector name="stomp" uri="stomp://localhost:61613"/>
</transportConnectors>

Once enabled on the proxy side, you can use any Python library that supports trampling Then, you can use stomp on the python side and JMS on the Java side to communicate with the proxy and send / receive from a specific destination

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>