Skip to content

Eventing SDK

Terminal window
dotnet add package Axowl.Sdk.Eventing.Client

The SDK is bi-directional:

  • Publish customer-defined events (custom.wallet.topup, …) — Axowl seals and archives them in the same chain as managed events (user.login, korean_identity.verified, …).
  • Poll events back — cursor-based, unary RPC (no streaming, so it works behind free-tier proxies).
builder.Services.AddAxowlEventing(opts =>
{
opts.ApiKey = builder.Configuration["Axowl:ApiKey"]!; // org API key (ah_live_...)
opts.Transport = TransportMode.GrpcWithFallback;
});
// inject IAxowlEventClient
var sealedEvent = await axowl.PublishAsync(
eventType: "custom.wallet.topup",
businessDataJson: JsonSerializer.Serialize(new { req.UserId, req.Amount }),
triggeredBy: req.UserId.ToString());
var page = await axowl.PollAsync(cursor: null, eventTypes: new[] { "custom.wallet.*" });
PieceRole
AddAxowlEventing(...)DI registration (ServiceCollectionExtensions.cs:30)
IAxowlEventClient.PublishAsync / PollAsyncThe two operations (Axowl.Sdk.Eventing.Abstractions/Interfaces/IAxowlEventClient.cs)
RestEventClient · GrpcEventClient · FallbackEventClient3-layer transport; gRPC first, REST fallback
ApiKeyInterceptorAttaches the org API key to gRPC calls
AxowlEventPollingServiceHosted background poller for subscribers

Events published through the SDK join the sealed audit chain (see Events catalog).