KubeMQ
DeployScenariosReplace your messaging stack

Replace STOMP with KubeMQ

Get your STOMP app running on KubeMQ in three steps — enable the connector, change the broker host, verify.

You need a license key to start KubeMQ — it's free, about 2-3 minutes (it includes creating a free account). Get one. Step 1 below starts the broker with the connector enabled.

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:next

The 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 disabled

3 · 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.

Didn't work?

  • Wrong port — plain TCP is 61613; TLS is 61614. Confirm your client dials the one you enabled.
  • Connector not enabled — a stock server doesn't bind the STOMP listener until CONNECTORS_STOMP_ENABLE=true is set (verbatim, with the underscore). Check docker logs kubemq for a bind error.
  • Auth mismatch — if Authentication.Enable = true on the server, the CONNECT passcode must carry a valid KubeMQ JWT; with auth disabled, any value works.

Was this page helpful?

On this page