Switching a client by its address
A Kafka client or a RESP client already in your code connects to TessariDB when you change the address it dials. Nothing else in the application changes.
An application that already produces to Kafka, or keeps sessions and counters through a RESP client, can move onto TessariDB by changing one setting: the address its client connects to. The client library stays. The code that calls it stays. The node speaks the two protocols itself, on their usual ports, and puts what arrives into the store's own topics and spaces.
What you change
| Client | Setting you change | Set it to |
|---|---|---|
| any Kafka client — producer, consumer, admin | bootstrap.servers | the node's Kafka address, host:9092 |
| any RESP client — RESP2 or RESP3 | its host and port, or its connection URL | the node's RESP address, host:6379 |
Then sign in as a store user, the way the client already signs in anywhere
else: SASL PLAIN for Kafka, AUTH or HELLO … AUTH for RESP. If the client
already uses TLS, it keeps using it: the node serves both protocols under the
same certificate as its other surfaces.
Turning the two surfaces on
Neither protocol is served until you give it an address:
tessaridb ./data \
--serve 0.0.0.0:9080 --http 0.0.0.0:8000 \
--kafka 0.0.0.0:9092 --kafka-database shop.orders \
--resp 0.0.0.0:6379 --resp-space shop.orders.cache
The container image takes the same settings as
variables (TESSARIDB_KAFKA, TESSARIDB_RESP and the rest) and exposes
ports 9092 and 6379 next to 9080 and 8000.
| Flag | Variable | What it does |
|---|---|---|
--kafka <host:port> | TESSARIDB_KAFKA | serves the Kafka protocol over the store's topics |
--kafka-database <ns>.<db> | TESSARIDB_KAFKA_DATABASE | where a bare topic name such as payments is read; without it a Kafka topic is named <namespace>.<database>.<topic> |
--kafka-advertise <host:port> | TESSARIDB_KAFKA_ADVERTISE | the address Kafka clients are told to reconnect to — set it when a port mapping or a proxy stands between them and the node |
--resp <host:port> | TESSARIDB_RESP | serves RESP2 and RESP3 over a space |
--resp-space <ns>.<db>.<space> | TESSARIDB_RESP_SPACE | the space a RESP connection starts in; without it a connection chooses one with TESSARIDB.USE |
INFO FOR NODE lists what the node is listening on under
clients.listeners, one row per surface with the address it bound, and the
console's This node page shows the same rows.
What you get by switching
What arrives over either protocol is data in the store, not in a server beside it:
- One transaction for everything. A Kafka record lands in a
topic, and a RESP key in a
space. A TessariQL script can read the topic, update an
order and set a cache key in the same
BEGIN … COMMIT. - Every reader agrees. A message produced by a Kafka client is read by
READ FROMin TessariQL and by a topic consumer that writes it into a table. A message appended by TessariQL, or by a RESP client'sXADD, is fetched by a Kafka consumer. - One set of users. The protocols sign in against the store's own users and grants, so a viewer can fetch but cannot produce, on every surface alike.
- One backup, one cluster. Topics and durable spaces are in the store's
snapshot, replicate with it and fail over with it. A space declared
IN MEMORYis the cache-server case: held by the node leading it, never written to disk or a backup, and empty after a restart or a failover.
Where the protocols and the store differ
Each page lists what a client may notice, but the short version is:
- A Kafka topic is a TessariDB topic, so it keeps every message in commit
order. Transactions (
transactional.id) and SCRAM sign-in are refused, and the idempotent producer is honoured until the node restarts. - A RESP connection works on one space, chosen by the node or by
TESSARIDB.USE.SELECT 0is accepted and any other index is refused. Scripting, bit fields, geo commands and the administrative commands are not served; TessariQL does that work.
Next
- Kafka clients — names, partitions, groups, offsets, sign-in and the API keys served.
- RESP clients — the space a connection works on, the value types, every command family, streams and pub/sub.