KubeMQ
ConnectorsCloudEventsReference

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:

FieldRule
TimeoutSecondsmust be greater than 0
SubBuffSizemust be greater than 0 and at most 10000
MaxSSEIdleSecondsmust be greater than 0
MaxSSEConnectionsmust 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.

config.toml
[Connectors.CE]
  Enable = true
  TimeoutSeconds = 60
  SubBuffSize = 100
  MaxSSEIdleSeconds = 300
  MaxSSEConnections = 0
cloudevents.env
CONNECTORSCE_ENABLE=true
CONNECTORSCE_TIMEOUT_SECONDS=60
CONNECTORSCE_SUB_BUFF_SIZE=100
CONNECTORSCE_MAX_SSE_IDLE_SECONDS=300
CONNECTORSCE_MAX_SSE_CONNECTIONS=0
docker 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:next

The 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 keyEnvironment variable
Connectors.CE.EnableCONNECTORSCE_ENABLE
Connectors.CE.TimeoutSecondsCONNECTORSCE_TIMEOUT_SECONDS
Connectors.CE.SubBuffSizeCONNECTORSCE_SUB_BUFF_SIZE
Connectors.CE.MaxSSEIdleSecondsCONNECTORSCE_MAX_SSE_IDLE_SECONDS
Connectors.CE.MaxSSEConnectionsCONNECTORSCE_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.go
export KUBEMQ_CE_URL=http://localhost:9090
python examples/python/events/basic_pubsub.py
export KUBEMQ_CE_URL=http://localhost:9090
node examples/javascript/events/basic-pubsub.js
export KUBEMQ_CE_URL=http://localhost:9090
mvn -q exec:java -Dexec.mainClass=com.kubemq.ce.events.BasicPubSub
export KUBEMQ_CE_URL=http://localhost:9090
dotnet run --project examples/csharp/Events/BasicPubSub
export KUBEMQ_CE_URL=http://localhost:9090
ruby examples/ruby/events/basic_pubsub.rb
KUBEMQ_CE_URL=http://localhost:9090 cargo run -p basic-pubsub

Every 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.

Was this page helpful?

On this page