Skip to content

Commit 38a3389

Browse files
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/integration-tests-events-rabbitmq.yml renamed to .github/workflows/integration-tests.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@ jobs:
1010
integration-tests:
1111
runs-on: ubuntu-latest
1212

13-
services:
14-
rabbitmq:
15-
image: rabbitmq:3
16-
env:
17-
RABBITMQ_DEFAULT_USER: guest
18-
RABBITMQ_DEFAULT_PASS: guest
19-
ports:
20-
- 5672:5672
21-
options: >-
22-
--health-cmd "rabbitmqctl node_health_check"
23-
--health-interval 10s
24-
--health-timeout 5s
25-
--health-retries 5
26-
2713
steps:
2814
- name: Checkout code
2915
uses: actions/checkout@v4
@@ -45,11 +31,6 @@ jobs:
4531
- name: Set bitcoind environment variable
4632
run: echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
4733

48-
- name: Run RabbitMQ integration tests
49-
run: cargo test --features integration-tests-events-rabbitmq --verbose --color=always -- --nocapture
50-
env:
51-
RUST_BACKTRACE: 1
52-
5334
- name: Run end-to-end tests
5435
run: cargo test --manifest-path e2e-tests/Cargo.toml --verbose --color=always -- --test-threads=4 --nocapture
5536
env:

0 commit comments

Comments
 (0)