diff --git a/databases/kafka.mdx b/databases/kafka.mdx index d035a7a..7449094 100644 --- a/databases/kafka.mdx +++ b/databases/kafka.mdx @@ -67,6 +67,8 @@ partition, so that ordering is a reading convenience and not a property of the l A `key` or `value` that is not valid UTF-8 is shown as hex. A null value is a tombstone and renders empty but distinct from a zero-length message, which matters on a compacted topic. +To watch new messages as they are produced, follow the topic in a [Live tab](/features/live-messages). + ## KafkaQL The query editor takes a small command language. diff --git a/databases/postgresql.mdx b/databases/postgresql.mdx index 8907c04..383634b 100644 --- a/databases/postgresql.mdx +++ b/databases/postgresql.mdx @@ -179,7 +179,7 @@ Sessions run in `UTF8` whatever encoding the database was created with, and the ## Tools -`EXPLAIN` and `EXPLAIN ANALYZE` run with `FORMAT JSON` and render as a plan diagram or tree. See [EXPLAIN Visualization](/features/explain-visualization). **Database > Users & Roles** shows where each privilege comes from before you grant or revoke it. **Backup Dump** and **Restore Dump** shell out to your local `pg_dump` and `pg_restore`; see [Backup & Restore](/features/backup-restore). The [Routine Debugger](/features/routine-debugger) steps through PL/pgSQL functions and procedures once the server has the `pldbgapi` extension. +`EXPLAIN` and `EXPLAIN ANALYZE` run with `FORMAT JSON` and render as a plan diagram or tree. See [EXPLAIN Visualization](/features/explain-visualization). **Database > Users & Roles** shows where each privilege comes from before you grant or revoke it. **Backup Dump** and **Restore Dump** shell out to your local `pg_dump` and `pg_restore`; see [Backup & Restore](/features/backup-restore). The [Routine Debugger](/features/routine-debugger) steps through PL/pgSQL functions and procedures once the server has the `pldbgapi` extension. A [Live tab](/features/live-messages) runs `LISTEN` on a session of its own and shows each `NOTIFY` as it arrives. ## SSL/TLS diff --git a/databases/redis.mdx b/databases/redis.mdx index 73ed2d1..01ea5a3 100644 --- a/databases/redis.mdx +++ b/databases/redis.mdx @@ -165,7 +165,7 @@ New connections default to **Disabled**. SNI is sent in every TLS mode. - Redis Cluster serves database 0 only, and so does Valkey unless `cluster-databases` is above 1, in which case the sidebar lists each database. A cluster whose primaries refuse `CONFIG` shows `db0` alone. The Database Index field is hidden in Cluster mode, and a cluster connection always opens on `db0`. - A command whose keys span hash slots, such as `RENAME`, `SMOVE`, or the `*STORE` commands, is refused in Cluster mode before it is sent. Give the keys a shared hash tag, like `{user}:1` and `{user}:2`. - A key that is not valid UTF-8 never appears in the grid or the tree. Reach it from the CLI; values have no such limit. -- Pub/Sub has no grid support. `PUBLISH` runs in the CLI, and there is no subscriber view. +- Pub/Sub has no grid support. Follow channels in a [Live tab](/features/live-messages), or run `PUBLISH` in the CLI. - The sidebar tree loads at most 50,000 keys and a filter scans at most 10,000 matches. Narrow the pattern, or `SCAN` from the CLI. - Values and TTLs cannot be filtered on. Redis has no server-side primitive for either; filter by key pattern and type only. - No import. Export works as it does elsewhere. diff --git a/docs.json b/docs.json index 7d896d6..b85ddaa 100644 --- a/docs.json +++ b/docs.json @@ -313,6 +313,7 @@ "features/table-structure", "features/routines-triggers", "features/routine-debugger", + "features/live-messages", "features/user-defined-types", "features/table-operations", "features/er-diagram", diff --git a/features/live-messages.mdx b/features/live-messages.mdx new file mode 100644 index 0000000..21d532a --- /dev/null +++ b/features/live-messages.mdx @@ -0,0 +1,55 @@ +--- +title: Live Messages +description: Watch PostgreSQL notifications, Redis channels and Kafka topics as messages arrive, and send test messages +--- + +A Live tab shows messages that flow past a connection instead of being stored: PostgreSQL `NOTIFY`, Redis Pub/Sub and new Kafka records. Each row has the time, the channel or topic and the payload. The tab reads on a connection of its own, so your query tabs and their transactions are never touched, and closing the tab closes that connection. + +## Turn it on + +Live Messages is a module, off by default. Select **Live Messages** under **Modules** in **Settings > Extensions**. That adds **Database > Live Messages…**. Deselecting the checkbox removes the command and closes every Live tab. + +## Engine support + +| Engine | What you follow | Send field | Extra columns | +|---|---|---|---| +| PostgreSQL | Channels, with `LISTEN` | `NOTIFY`, sent with `pg_notify` | None | +| Redis | Channels with `SUBSCRIBE`, patterns with `PSUBSCRIBE` | `PUBLISH` | Pattern | +| Kafka | Topics, from the end of each partition | Produce to the topic's first partition | Partition, Offset, Key | + +Other engines have no Live tab, Redshift, CockroachDB and PGlite included. + +## Start following + + + + Choose **Database > Live Messages…** on a connected PostgreSQL, Redis or Kafka connection. On Kafka, the topic open in the front tab is filled in. + + + Separate names with commas. On Redis, the **Patterns** field takes glob patterns such as `news.*`. + + + Click **Listen**, **Subscribe** or **Follow**. The new tab connects and starts listing messages, newest at the top. + + + +## Work with the list + +- **Pause** freezes the list. Messages keep arriving underneath, and the count of new ones shows beside the button. **Resume** shows them. +- **Clear** empties the list. +- The filter field matches the channel, the payload and the Kafka key. +- **Copy** copies the selected rows, or every shown row when none is selected, as tab-separated text. Command-C does the same. +- **Export…** saves the shown rows as a CSV file. +- The tab keeps the newest 10,000 messages. Older ones are dropped as new ones arrive. + +To send a test message, type the channel or topic and a payload in the bar at the bottom and click **Send**. + +## Dropped connections + +When the connection drops, a **Connection lost** row marks the gap, and the tab connects and subscribes again on its own, waiting 1 second, then 2, then longer, up to 30 seconds between tries. Messages sent while it was down are not received, except on Kafka, where nothing is lost from the log but reading starts again at the end. A name that fails on the first try, such as a Kafka topic that does not exist, ends the tab with the error instead. + +## Engine notes + +- **PostgreSQL**: a channel name is an identifier, so `Orders` and `orders` are different channels, matching `LISTEN "Orders"`. The payload limit is the server's, 8000 bytes by default. +- **Redis**: Cluster mode subscribes on one node, which receives every `PUBLISH` in the cluster. Sharded Pub/Sub (`SSUBSCRIBE`) is not followed. A second connection opens the first time you send, because a subscribed connection cannot run `PUBLISH`. +- **Kafka**: the tab reads with plain fetches and no consumer group, so it never joins a group or moves committed offsets. A key or payload that is not valid UTF-8 shows as hex. The time is the record's own timestamp. diff --git a/features/plugins.mdx b/features/plugins.mdx index 3acc67f..0229a8d 100644 --- a/features/plugins.mdx +++ b/features/plugins.mdx @@ -105,7 +105,7 @@ Saved connections survive a removal. A connection whose driver cannot load stays ## Modules -**Settings > Extensions** lists **Modules** above the plugins. A module comes with the app and stays out of the menus until you select its checkbox. The checkbox is per Mac and does not sync. **Routine Debugger** is the one module; see [Routine Debugger](/features/routine-debugger#turn-it-on). +**Settings > Extensions** lists **Modules** above the plugins. A module comes with the app and stays out of the menus until you select its checkbox. The checkbox is per Mac and does not sync. The modules are **Routine Debugger** ([Routine Debugger](/features/routine-debugger#turn-it-on)) and **Live Messages** ([Live Messages](/features/live-messages#turn-it-on)). ## Themes