Replace STOMP with KubeMQ
Get your STOMP app running on KubeMQ in three steps — enable the connector, change the broker host, verify.
Point your existing STOMP client at KubeMQ by changing the broker host — the connection changes, your STOMP client library and destination code don't.
Drop-in level: endpoint-only (legend)
1 · Enable the connector
The STOMP connector is disabled by default. Start KubeMQ with it turned on:
docker run -d \ --name kubemq \ -p 61613:61613 \ -p 61614:61614 \ -p 50000:50000 \ -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY \ -e CONNECTORS_STOMP_ENABLE=true \ europe-docker.pkg.dev/kubemq/images/kubemq:nextThe enable variable is CONNECTORS_STOMP_ENABLE — with the underscore between
CONNECTORS and STOMP. CONNECTORSSTOMP_ENABLE (no underscore) is silently ignored.
2 · Point your client at KubeMQ
Change the broker host to KubeMQ's plain-TCP port. Everything else — the client
library, SEND/SUBSCRIBE calls, destination names — stays the same.
Before:
import stomp
conn = stomp.Connection([("stomp-host", 61613)])
conn.connect("user", "password", wait=True)After (KubeMQ):
import stomp
conn = stomp.Connection([("localhost", 61613)])
conn.connect("user", "password", wait=True) # any login/passcode when auth is disabled3 · Smoke test
In one terminal, subscribe to a queue destination:
# consumer.py
import stomp, time
class Listener(stomp.ConnectionListener):
def __init__(self, conn):
self._conn = conn
def on_message(self, frame):
print("RECEIVED:", frame.body)
self._conn.ack(frame.headers["ack"])
conn = stomp.Connection([("localhost", 61613)])
conn.set_listener("", Listener(conn))
conn.connect(wait=True)
conn.subscribe(destination="/queue/smoke-test", id="s1", ack="client-individual")
time.sleep(10)
conn.disconnect()In a second terminal, publish one message:
# producer.py
import stomp
conn = stomp.Connection([("localhost", 61613)])
conn.connect(wait=True)
conn.send(destination="/queue/smoke-test", body="hello from stomp")
conn.disconnect()
print("sent")Expected output in the consumer terminal:
RECEIVED: hello from stomp(from the full verification smoke test)
What carries over — and what doesn't
Your STOMP client library, connection API, and all five destination types (/queue,
/topic, /topic-store, /command, /query) carry over unchanged. STOMP transactions
and message selectors don't — both are rejected outright.
STOMP getting started
The full connect → send → subscribe walkthrough.
Migrating from STOMP
The complete compatibility matrix and deviations.
Didn't work?
- Wrong port — plain TCP is
61613; TLS is61614. Confirm your client dials the one you enabled. - Connector not enabled — a stock server doesn't bind the STOMP listener until
CONNECTORS_STOMP_ENABLE=trueis set (verbatim, with the underscore). Checkdocker logs kubemqfor a bind error. - Auth mismatch — if
Authentication.Enable = trueon the server, the CONNECTpasscodemust carry a valid KubeMQ JWT; with auth disabled, any value works.
Was this page helpful?
Replace Google Cloud Pub/Sub with KubeMQ
Point an unmodified Pub/Sub client at KubeMQ by setting PUBSUB_EMULATOR_HOST — enable the connector and verify.
Replace JMS, ActiveMQ, or AMQP 1.0 with KubeMQ
Move JMS, ActiveMQ (Java), or native AMQP 1.0 clients onto KubeMQ's one AMQP 1.0 connector — per-client on-ramps and verification.