Commit 38a3389
committed
Replace RabbitMQ event publishing with Server-Sent Events
Remove the RabbitMQ-based EventPublisher trait and lapin dependency
in favor of a built-in SSE streaming endpoint. Events are now
delivered directly to clients over HTTP/TLS via a /Subscribe
endpoint, eliminating the need for an external message broker.
The server uses a tokio broadcast channel internally. The new
SseBody type implements hyper::body::Body to stream events as
JSON in SSE format. Event publishing becomes synchronous and
fire-and-forget when no subscribers are connected.
Add a subscribe command to the CLI that connects to the SSE
endpoint and prints each event as a JSON line to stdout. The
client library exposes a typed async event stream via
LdkServerClient::subscribe().
E2E tests use CliEventConsumer which spawns the CLI subscribe
command as a child process, replacing the previous raw TLS/SSE
consumer and RabbitMQ consumer.
AI tools were used in preparing this commit.1 parent b1ef1fc commit 38a3389
21 files changed
Lines changed: 398 additions & 2890 deletions
File tree
- .github/workflows
- e2e-tests
- src
- tests
- ldk-server-client
- src
- ldk-server-cli
- src
- ldk-server-json-models/src
- ldk-server
- src
- io/events
- rabbitmq
- util
Lines changed: 0 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 13 | | |
28 | 14 | | |
29 | 15 | | |
| |||
45 | 31 | | |
46 | 32 | | |
47 | 33 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 34 | | |
54 | 35 | | |
55 | 36 | | |
| |||
0 commit comments