Search code examples
pythonactivemq-classicstomp

Do we have any Python client implementing STOMP 1.1 & auto failover support?


I need to use some Python STOMP client to talk to my ActiveMQ server using stomp protocol. I have searched for some Python STOMP client libraries and found some of them but they implement only STOMP 1.0. However, I need some features of STOMP 1.1 protocol, like the heartbeat support, so I'm looking for STOMP 1.1 Python client libraries. Do we have any STOMP 1.1 Python client libraries?

Also, is there any Python client library which supports the failover feature?

[UPDATE] Looks like stomppy supports STOMP 1.1 but I still didn't get any client which supports auto failover.


Solution

  • This looks little complicated than I was expecting and there are reasons for why one would not be coming up with a STOMP library with auto failover. For example, if a STOMP application is using transactions, etc, it would be fairly difficult to maintain the state in the STOMP library and replay the transactions to the new broker after failover.

    So, most of the libraries (even stomp.py) provide failover support only while connecting to the brokers for the first time. Later, the application has to take care of failover.

    I have successfully implemented this in my application for our purposes.