KubeMQ
ConnectorsCloudEventsReference

Endpoints

Reference for every CloudEvents HTTP endpoint — method, path, request, response status, and query parameters.

The CloudEvents connector exposes its full surface on the shared HTTP server (default port 9090) and is enabled by default. This page is the authoritative reference for every endpoint: the send and queue operations (POST), the SSE subscriptions (GET), their request bodies, success status codes, and query parameters. To disable the connector, set CONNECTORSCE_ENABLE=false — see Configuration.

Base URL

All endpoints are served from the shared HTTP server:

http://localhost:9090

The port is inherited from the REST transport (default 9090). See the shared HTTP server page for the middleware chain, body limits, and SSE handling that apply to every route below.

Endpoint table

The connector groups its 12 endpoints into three families — send (synchronous operations across the five messaging patterns), queue (durable-queue control), and subscribe (long-lived SSE streams).

MethodPathPurposeRequest bodySuccess status
POST/ce/send/eventFire-and-forget pub/sub eventCloudEvent (structured or binary)202 Accepted
POST/ce/send/event-storePersistent, replayable eventCloudEvent (structured or binary)202 Accepted
POST/ce/send/commandCommand (execution confirmation)CloudEvent (structured or binary)202 Accepted
POST/ce/send/queryQuery (data response)CloudEvent (structured or binary)200 OK
POST/ce/send/responseResponse to a command/queryCloudEvent + ?request_id=202 Accepted
POST/ce/queue/sendSend a message to a queueCloudEvent (structured or binary)202 Accepted
POST/ce/queue/receiveReceive (or peek) queue messagesNone (body ignored)200 OK
POST/ce/queue/ack_allAcknowledge all pending queue messagesNone (body ignored)200 OK
GET/ce/subscribe/eventsSSE pub/sub subscription200 text/event-stream
GET/ce/subscribe/events-storeSSE persistent subscription with replay200 text/event-stream
GET/ce/subscribe/commandsSSE command subscription200 text/event-stream
GET/ce/subscribe/queriesSSE query subscription200 text/event-stream

The two success statuses are deliberate: /ce/send/query and the queue receive/ack operations return 200 OK because they carry a synchronous payload, while the fire-and-forget and command sends return 202 Accepted. All SSE endpoints return 200 with Content-Type: text/event-stream.

Send endpoints

All five send endpoints accept a CloudEvent in either content mode — structured (application/cloudevents+json body) or binary (ce-* headers + raw data body). See Content modes for the wire format, and Channel resolution for how the destination channel is derived from subject or ?channel=.

EndpointPatternBlocks for a replyNotes
/ce/send/eventEventsNoPub/sub fan-out; returns the send result in data.
/ce/send/event-storeEvents StoreNoPersisted and replayable; same shape as /ce/send/event.
/ce/send/commandCommandYesWaits for execution confirmation; timeout from TimeoutSeconds.
/ce/send/queryQueryYesWaits for a data response (returns 200); timeout from TimeoutSeconds.
/ce/send/responseCommand/Query replyNoRequires ?request_id=; subject is the reply channel.

The /ce/send/response endpoint is the only send endpoint with a required query parameter:

ParameterTypeRequiredDescription
request_idstringYesThe request ID from the received command/query, used for correlation.

Synchronous send endpoints enforce TimeoutSeconds (default 60s). A request that exceeds the timeout returns HTTP 504. SSE subscriptions are long-lived and are not subject to this timeout.

# Send a fire-and-forget event (structured mode)
curl -X POST http://localhost:9090/ce/send/event \
  -H "Content-Type: application/cloudevents+json" \
  -d '{
    "specversion": "1.0",
    "type": "com.example.order.created",
    "source": "order-service",
    "subject": "notifications",
    "data": {"order_id": "12345", "amount": 99.99}
  }'

Queue endpoints

The queue family adds durable, at-least-once delivery. send carries a CloudEvent body; receive and ack_all are control operations — the request body is ignored and all inputs come from query parameters.

POST /ce/queue/send

Send a CloudEvent to a queue channel. Returns 202 Accepted with the send result in data.

POST /ce/queue/receive

Receive (or peek at) messages from a queue. Returns 200 OK with the received messages; each message carrying ce_* tags is reconstructed as a CloudEvent, others are returned in native KubeMQ form.

ParameterTypeRequiredDefaultDescription
channelstringYesQueue channel name.
client_idstringYesClient identifier (overridden by auth claims when auth is enabled).
max_messagesintNo1Maximum messages to receive (1–1000).
wait_timeoutintNo5Wait timeout in seconds.
is_peekboolNofalsePeek at messages without consuming them.

POST /ce/queue/ack_all

Acknowledge (drain) all pending messages in a queue. Returns 200 OK with the ack result in data.

ParameterTypeRequiredDefaultDescription
channelstringYesQueue channel name.
client_idstringYesClient identifier (overridden by auth claims when auth is enabled).
wait_timeoutintNo5Wait timeout in seconds.
# Receive up to 10 messages, waiting up to 10 seconds
curl -X POST "http://localhost:9090/ce/queue/receive?channel=work-queue&client_id=worker-1&max_messages=10&wait_timeout=10"

See Queues for the full send/receive walkthrough.

Subscribe endpoints (SSE)

All four subscription endpoints are long-lived GET requests that respond with Content-Type: text/event-stream and HTTP 200. They have no request body — the subscription is configured entirely through query parameters. See SSE behavior for the frame format, keepalive, idle timeout, and reconnection semantics.

EndpointPatternReplay support
/ce/subscribe/eventsEventsNo (non-persistent).
/ce/subscribe/events-storeEvents StoreYes — events_store_type/events_store_value and Last-Event-ID.
/ce/subscribe/commandsCommandNo; frames include request-ID/reply-channel fields.
/ce/subscribe/queriesQueryNo; frames include request-ID/reply-channel fields.

Common SSE query parameters

All four endpoints share these base parameters:

ParameterTypeRequiredDescription
client_idstringYesClient identifier (overridden by auth claims when auth is enabled).
channelstringYesChannel to subscribe to.
groupstringNoLoad-balancing group name.

Events-store replay parameters

/ce/subscribe/events-store accepts two additional parameters that select the replay start position:

ParameterTypeDefaultDescription
events_store_typeint1 (StartNewOnly)Start position (1–6); see the table below.
events_store_valueint640Value for sequence/time-based positions (types 4, 5, 6).
ValueNameDescription
1StartNewOnlyOnly new messages from this point forward.
2StartFromFirstReplay from the first stored message.
3StartFromLastStart from the last stored message.
4StartAtSequenceStart at a specific sequence number (events_store_value).
5StartAtTimeStart at a Unix timestamp in seconds (events_store_value).
6StartAtTimeDeltaStart at a time delta in seconds from now (events_store_value).

For events-store subscriptions, the server emits an id: field (the message sequence) on each frame. Reconnecting with the Last-Event-ID header resumes from sequence + 1. If both Last-Event-ID and events_store_type are present, the query parameter wins — omit events_store_type to use header-based reconnection.

SSE connection limits

BehaviorSettingStatus when exceeded
Idle timeoutMaxSSEIdleSeconds (default 300s)error event (stream idle timeout), connection closed.
Connection capMaxSSEConnections (default 0 = unlimited)HTTP 429 Too Many Requests.
# Subscribe to events
curl -N "http://localhost:9090/ce/subscribe/events?client_id=my-client&channel=notifications"

# Subscribe to events-store, replaying from the first stored message
curl -N "http://localhost:9090/ce/subscribe/events-store?client_id=my-client&channel=audit-log&events_store_type=2"

# Reconnect to events-store, resuming after sequence 42
curl -N -H "Last-Event-ID: 42" \
  "http://localhost:9090/ce/subscribe/events-store?client_id=my-client&channel=audit-log"

Response envelope

Every endpoint returns the same response envelope. Successful responses carry the operation result in data; errors set is_error to true with a descriptive message:

{
  "is_error": false,
  "message": "OK",
  "data": { }
}

Status codes

StatusMeaningWhen
200OKQuery response, queue receive, queue ack_all, and all SSE streams.
202AcceptedEvent send, event-store send, command send, queue send, response send.
400Bad RequestInvalid CloudEvent (including unrecognized Content-Type), missing required parameters, validation failure, reserved channel name, subscription error.
429Too Many RequestsSSE connection limit (MaxSSEConnections) exceeded.
500Internal Server ErrorBackend messaging error or SSE setup failure.
504Gateway TimeoutA synchronous request exceeded TimeoutSeconds.

The full error message catalog lives in CE ↔ KubeMQ mapping.

Was this page helpful?

On this page