You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eventmesh-sdks/eventmesh-sdk-rust/README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,11 @@ transport failures. HTTP consumers and webhook registrations additionally
82
82
provide `close().await`, which unregisters remote subscriptions before
83
83
signalling shutdown and joining.
84
84
85
+
`GrpcWebhookConsumer` does not automatically unregister remote webhook
86
+
subscriptions when `shutdown()` or `join()` is called. Retain the subscriptions
87
+
and webhook URL, call `unsubscribe(...).await` explicitly, and only then call
88
+
`shutdown()` and `join().await`. See the `grpc_webhook_consumer` example.
89
+
85
90
HTTP request/reply is not exposed because the current SDK and stock Runtime do not provide a complete HTTP responder path. Use gRPC or TCP for request/reply.
86
91
87
92
`Message` is a public dialect envelope, not a wire format. The selected transport owns protobuf, HTTP form, or TCP frame serialization. With `cloud_events`, CloudEvents remain CloudEvents; `Message::into_event_mesh()` does not silently flatten them into the native EventMesh model.
Copy file name to clipboardExpand all lines: eventmesh-sdks/eventmesh-sdk-rust/examples/README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,28 @@ Each example is a small executable with one responsibility. They use the default
6
6
| --- | --- | --- | --- |
7
7
| gRPC |`grpc_producer`| Publish a native EventMesh message |`cargo run --example grpc_producer --features grpc`|
8
8
| gRPC |`grpc_consumer`| Stream consumption with `MessageHandler`|`cargo run --example grpc_consumer --features grpc`|
9
+
| gRPC |`grpc_webhook_consumer`| Register an application-owned webhook and explicitly unregister it on exit |`cargo run --example grpc_webhook_consumer --features grpc`|
9
10
| gRPC |`grpc_producer_cloud_events`| Publish a CloudEvent |`cargo run --example grpc_producer_cloud_events --features grpc,cloud_events`|
11
+
| gRPC |`grpc_batch`| Publish several native messages with one batch RPC |`cargo run --example grpc_batch --features grpc`|
12
+
| gRPC |`grpc_request_reply`| Run a synchronous subscriber and complete request/reply |`cargo run --example grpc_request_reply --features grpc`|
10
13
| HTTP |`http_producer`| Publish over HTTP |`cargo run --example http_producer --features http`|
14
+
| HTTP |`http_producer_cloud_events`| Publish a CloudEvent over HTTP |`cargo run --example http_producer_cloud_events --features http,cloud_events`|
11
15
| HTTP |`http_consumer_server`| SDK-managed axum callback server |`cargo run --example http_consumer_server --features http`|
| TCP |`tcp_producer_cloud_events`| Publish a CloudEvent over TCP |`cargo run --example tcp_producer_cloud_events --features tcp,cloud_events`|
20
+
| TCP |`tcp_broadcast`| Send a fire-and-forget broadcast |`cargo run --example tcp_broadcast --features tcp`|
21
+
| TCP |`tcp_request_reply`| Run a synchronous subscriber and complete request/reply |`cargo run --example tcp_request_reply --features tcp`|
16
22
17
23
Run a consumer first, then run its corresponding producer. The HTTP examples listen on ports 8080 (built-in server) and 8081 (custom endpoint); change the advertised callback URL when EventMesh cannot reach `127.0.0.1`.
18
24
19
25
The examples intentionally use minimal configuration. For timeouts, identity, credentials, HTTP TLS, endpoint weights, and TCP reconnect tuning, consult the public rustdoc with `cargo doc --features full --no-deps --open`.
26
+
27
+
The two HTTP consumer examples handle Ctrl-C and call `close().await`, which
28
+
unregisters their remote subscriptions before stopping local background work.
29
+
Use the same shutdown pattern in long-running applications.
30
+
31
+
The gRPC webhook consumer has no automatic remote cleanup. Its example retains
32
+
the subscription and URL, calls `unsubscribe().await` after Ctrl-C, and then
0 commit comments