Kafka Messaging Model
The Camel Messaging Service (CMS) gives the applications of an environment Kafka clusters to publish and read messages. It is a diskless streaming service, API compatible with Apache Kafka®: any Kafka client connects to it, and the brokers keep nothing on their own disks.
Diskless Brokers
A Kafka broker usually owns its data: partitions live on its disks and are replicated between brokers. A CMS broker holds no data. Every broker of a cluster reads and writes the same store (an S3 bucket or a PostgreSQL database), so the durability of the messages is the durability of that store.
What follows from it:
- brokers are added and removed without moving a partition, which is what makes autoscaling on CPU and memory usable;
- a broker that restarts loses nothing, since it kept nothing;
- there is no replication factor to choose: the store replicates.
The exception is the Local storage: one broker, on a disk of its own, or for development on a volume that lives as long as its pod.
Object Model
| What it is | Kubernetes resource | |
|---|---|---|
| Camel Messaging Service | The service of an environment that runs its clusters. Activated once per environment. | the cms-operator release of the namespace |
| Cluster | A set of brokers behind one bootstrap address, with its storage and its security | Cluster (cms.camelx.io/v1alpha1) |
| User | A SCRAM account of a cluster, with the Secret a client connects with | User |
| Topic | A topic of a cluster: its partitions and its configs | Topic |
A cluster, a user and a topic are each deployed on their own: each is one deployment request, with its revisions, its policies and its instances. A user and a topic name their cluster, and are listed on the page of that cluster.
Environment Scope
A cluster belongs to one environment. The operator of an environment watches the namespace of that
environment only: a Cluster, a User or a Topic is run by the operator of the environment it
is deployed in, and never by another one.
The console lists the clusters of the environment chosen at the top of the page.
Until the Camel Messaging Service is activated in an environment, the console offers to activate it instead of creating a cluster there.
Create a development cluster
- Activate the service. Open the environment, go to Camel Messaging, then Activate Camel messaging, and Apply.
- Create a cluster. In Camel Messaging › Clusters, click Create cluster, choose Local memory, give it a name, and create it.
- Apply changes on the page of the cluster. Its Service block shows the bootstrap address once the broker runs.
- Create a topic on its Topics tab, then Apply changes on the page of the topic.
A client of the environment then connects to the bootstrap address, in clear text and without authentication: add TLS and SCRAM before anything else than a trial.