Resources / MessageBroker
MessageBroker
A message broker for MQTT, AMQP and STOMP clients on a VPC, keeping all its state in Etorm storage. It accepts connections once its engine is available on the platform; until then it stays Pending with reason EngineNotAvailable. The password is shown once, when the broker is created.
Overview
| API | queues.etorm.com/v1alpha1 |
| Resource | messagebrokers (cluster-scoped inside its cluster) |
| Short names | mq |
| Available in | project clusters only |
| Status | written by a controller through /status |
Minimal example
apiVersion: queues.etorm.com/v1alpha1
kind: MessageBroker
metadata:
name: example
spec:
vpcRef:
name: "<name>"
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
vpcRef | reference to VPC | yes | The VPC the broker's addresses are on. Cannot be changed. | ||
protocols | list of string | up to 3 items | Which protocols to accept: mqtt (MQTT 5.0 and 3.1.1, port 1883), amqp (AMQP 0-9-1, port 5672), stomp (STOMP 1.2, port 61613). All three by default. | ||
nodes | integer | 1 | 1 to 5 | How many broker nodes share the work; any node accepts any client. | |
user | string | up to 63 characters | The user clients log in as. Defaults to app. Cannot be changed. | ||
passwordGeneration | integer | at least 0 | Raise it to set a new password for the user: the new password is shown once, in the response to that change, and the old one stops working. It cannot be lowered. | ||
monitoringRef | reference to MonitoringWorkspace | Optional MonitoringWorkspace to export queue depth, publish/consume rates, and lag to. | |||
resources | object | {} | What each node may use. | ||
resources.memoryPower | integer | 6 | 0 to 10 | Memory per node: 64 KiB times two to this power (6 is 4 MiB). | |
resources.cpuMillicores | integer | 250 | 1 to 1000 | Processor time per node on average, in thousandths of a core. |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
phase | string | Pending, Ready, Degraded (some nodes are not running) or Failed. | |||
endpoints | list of object | Where clients connect: one entry per node. | |||
endpoints[].address | string | Its IPv6 address on the VPC. | |||
endpoints[].mqtt | integer | MQTT port, when enabled. | |||
endpoints[].amqp | integer | AMQP port, when enabled. | |||
endpoints[].stomp | integer | STOMP port, when enabled. | |||
endpoints[].serving | boolean | True on the node that accepts clients now (it holds the broker's state); the others are standbys that take over on failure. | |||
usage | object | What it has used, as billed (spec 0006): CPU time and the bytes it holds now. | |||
usage.cpuSeconds | number | CPU time used since `since`, for queries and housekeeping, in seconds. | |||
usage.storageBytes | integer | Bytes it holds now (billed as GiB-seconds while they are held). | |||
usage.since | string | When metering started (RFC 3339). | |||
usage.fuelTotal | integer | Internal: all fuel counted so far (2 000 000 000 per CPU-second). | |||
usage.fuelSeen | object | Internal: the last fuel count seen per instance. | |||
passwordVerifier | string | The salted verifier of the user's password (SCRAM-SHA-256), never the password. | |||
password | string | The user's password: present only in the response that created the broker, never stored. | |||
conditions | list of object | Detailed state, one entry per aspect; Ready says whether the broker accepts connections. | |||
conditions[].type | string | Aspect. | |||
conditions[].status | string | True or False. | |||
conditions[].reason | string | Machine-readable reason. | |||
conditions[].message | string | Human-readable detail. |
Columns in listings
| Column | From |
|---|---|
| Nodes | .spec.nodes |
| Address | .status.endpoints[0].address |
| Phase | .status.phase |
| Detail | .status.conditions[0].message |