Repository navigation
feat(live-messages): follow PostgreSQL, Redis and Kafka messages live - #3981
Merged
Merged
Conversation
… live tabs on disconnect
datlechin
enabled auto-merge (squash)
November 1, 2026 09:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
liveMessages). With it on, Database > Live Messages… opens a sheet that takes channels or topics, then a Live tab that lists messages as they arrive: time, channel or topic and payload, plus pattern on Redis and partition, offset and key on Kafka. With it off, no menu item, observer or connection is left behind.NOTIFY,PUBLISH, or a produce on Kafka).PluginLiveMessagingwithPluginLiveSubscriptionandPluginLiveSessionSource. It is a separate protocol, likePluginRoutineDebugging, so it adds no requirement to existing drivers. No kit bump: main is already at 41, one past the 40 that v0.84.0-beta.1 shipped.LISTENper channel (quoted as an identifier), then readsPQnotifiesafter polling the socket in 250 ms slices on the connection's own queue.NOTIFYgoes throughpg_notify($1, $2). PGlite opts out, since a second session opens a different database. Redshift and CockroachDB do not conform.SUBSCRIBEandPSUBSCRIBEon a dedicated connection, read by polling the socket and draining hiredis's reader, never through a hiredis read timeout, which would leave the context unusable.PUBLISHopens a second connection on first use, since a subscribed connection refuses it. Cluster subscribes on one node, which gets every classicPUBLISH.Defaults I picked: newest rows at the top, so a new message is in sight without scrolling; on Kafka, a reconnect starts at the end again and the gap row marks it.
Docs: TableProApp/docs#157 (draft, merges after this one).
Test plan
LiveMessageBufferTests(cap, ids, gap, filter),LiveMessageControllerTests(pause keeps messages, a drop leaves one gap row and resubscribes after the backoff, a first failure ends the tab, stop closes the subscription),LiveMessageExportTests,LiveMessagesModuleResidueTests(no menu item while off, toggling adds and removes it),PostgreSQLListenStatementsTests,RedisLivePushTests.subscribewith a session source of fresh drivers:NOTIFYfrompsqlarrived about 200 ms after it was sent, a channel namedAudit Logworked, andpg_terminate_backendended the stream with an error, which the tab answers with a gap row and a resubscribe.PUBLISHfromredis-clito a channel and to aPSUBSCRIBEpattern both arrived within 100 ms, the testPUBLISHwent out on a second connection, andCLIENT KILL TYPE pubsubended the stream with an error.kafka-consumer-groups --listwas empty before and after.verify.sh pluginswas not run locally (low disk); the Kafka plugin was built on its own.Fixes #3614