Configuration
Full field reference for the KubeMQ CloudEvents connector — CeConfig fields, validation rules, and TOML, environment variable, and Docker examples.
This is the full field reference for the CloudEvents connector's Connectors.CE
config section — every field, its validation rules, and how to set them via TOML,
environment variables, or Docker. For the enabled-by-default model and how config
keys map to environment variable names, see the
configuration model.
Config fields
All fields live under [Connectors.CE]. Defaults are taken verbatim from the
server's CeConfig struct.
Prop
Type
Validation rules
Validation is skipped entirely when Enable is false. When the connector is
enabled, the server rejects an invalid config at startup with these rules:
| Field | Rule |
|---|---|
TimeoutSeconds | must be greater than 0 |
SubBuffSize | must be greater than 0 and at most 10000 |
MaxSSEIdleSeconds | must be greater than 0 |
MaxSSEConnections | must be greater than or equal to 0 |
Configuring the connector
The same five settings can be supplied through a TOML config file, environment
variables, or docker run flags. Pick whichever fits your deployment.
[Connectors.CE]
Enable = true
TimeoutSeconds = 60
SubBuffSize = 100
MaxSSEIdleSeconds = 300
MaxSSEConnections = 0CONNECTORSCE_ENABLE=true
CONNECTORSCE_TIMEOUT_SECONDS=60
CONNECTORSCE_SUB_BUFF_SIZE=100
CONNECTORSCE_MAX_SSE_IDLE_SECONDS=300
CONNECTORSCE_MAX_SSE_CONNECTIONS=0docker run -d \ --name kubemq \ -p 8080:8080 \ -p 9090:9090 \ -p 50000:50000 \ -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY \ -e CONNECTORSCE_SUB_BUFF_SIZE=500 \ -e CONNECTORSCE_MAX_SSE_CONNECTIONS=1000 \ europe-docker.pkg.dev/kubemq/images/kubemq:nextThe connector is already enabled, so the Docker example overrides only the
SSE buffer and a connection cap. There is no -e CONNECTORSCE_ENABLE=true —
that would be redundant. Set CONNECTORSCE_ENABLE=false only when you want to
turn the connector off.
Environment variable names
Each variable below is derived from its dotted config key by the server's standard
env-var transform (see
Environment variable names
for the derivation rule — including why the enable variable is CONNECTORSCE_ENABLE,
not CONNECTORS_CE_ENABLE).
| Config key | Environment variable |
|---|---|
Connectors.CE.Enable | CONNECTORSCE_ENABLE |
Connectors.CE.TimeoutSeconds | CONNECTORSCE_TIMEOUT_SECONDS |
Connectors.CE.SubBuffSize | CONNECTORSCE_SUB_BUFF_SIZE |
Connectors.CE.MaxSSEIdleSeconds | CONNECTORSCE_MAX_SSE_IDLE_SECONDS |
Connectors.CE.MaxSSEConnections | CONNECTORSCE_MAX_SSE_CONNECTIONS |
The CloudEvents connector shares the HTTP server's port (9090), body limit, CORS,
and TLS settings. Those are configured under Connectors.Http and documented once
in Shared HTTP server — not repeated here.
For the conceptual explanation of the enable model, see the
configuration model.
Verifying the connector is live
Because the connector is enabled by default, you can confirm it is serving as soon
as the server is up — send a CloudEvent and watch for an HTTP 202.
curl -i -X POST http://localhost:9090/ce/send/event \
-H 'Content-Type: application/cloudevents+json' \
-d '{
"specversion": "1.0",
"type": "com.example.healthcheck",
"source": "config-check",
"id": "check-1",
"subject": "diagnostics",
"data": {"ok": true}
}'# Point the example client at your server, then run the basic pub/sub sample.
export KUBEMQ_CE_URL=http://localhost:9090
go run ./examples/go/events/basic-pubsub/main.goexport KUBEMQ_CE_URL=http://localhost:9090
python examples/python/events/basic_pubsub.pyexport KUBEMQ_CE_URL=http://localhost:9090
node examples/javascript/events/basic-pubsub.jsexport KUBEMQ_CE_URL=http://localhost:9090
mvn -q exec:java -Dexec.mainClass=com.kubemq.ce.events.BasicPubSubexport KUBEMQ_CE_URL=http://localhost:9090
dotnet run --project examples/csharp/Events/BasicPubSubexport KUBEMQ_CE_URL=http://localhost:9090
ruby examples/ruby/events/basic_pubsub.rbKUBEMQ_CE_URL=http://localhost:9090 cargo run -p basic-pubsubEvery CloudEvents example client reads the server base URL from the
KUBEMQ_CE_URL environment variable, defaulting to http://localhost:9090.
Override it to point at a remote or clustered KubeMQ deployment.
Related
Getting Started
Publish a CloudEvent and subscribe over SSE in a few minutes.
Shared HTTP server
Port 9090, the middleware chain, body limit, and the connector enable model.
SSE behavior
How SubBuffSize, MaxSSEIdleSeconds, and MaxSSEConnections shape live subscriptions.
Endpoints reference
The full CloudEvents endpoint table and status codes.
Was this page helpful?