Skip to content

v0.4.0

Choose a tag to compare

@artpar artpar released this 03 Apr 16:41
· 22 commits to master since this release

What's New

WebSocket pub/sub commands (daptin ws)

Full support for Daptin's real-time WebSocket API (/live endpoint):

  • ws listen <topic> — Subscribe to a topic and stream events as JSON lines. Supports --filter key=value for server-side filtering (including EventType=create|update|delete).
  • ws publish <topic> <json> — Publish a message to a topic.
  • ws topic create|destroy|set-permission — Manage user-created topics.
  • ws verify --endpoints ep1,ep2 — Cross-node PubSub health check for cluster deployments. Connects to two endpoints, creates a topic, subscribes, publishes, and verifies delivery with latency measurement.

Improved error reporting

WebSocket connection failures now surface the actual HTTP status code and server response body instead of the opaque "bad status" error.

Example usage

# Stream CRUD events on a table
daptin ws listen user_account

# Stream only create events
daptin ws listen user_account --filter EventType=create

# Publish to a user topic
daptin ws topic create notifications
daptin ws publish notifications '{"text": "hello world"}'

# Verify cluster PubSub
daptin ws verify --endpoints http://pod-0:8080,http://pod-3:8080

Full Changelog: v0.3.0...v0.4.0