IWebhookPublisher
Namespace AgentPrism · Assembly
AgentPrism.Abstractions.dllThe component that publishes an event to its subscriptions.
public interface IWebhookPublisherRemarks
Section titled “Remarks”Core code calls this; delivery does not happen in the request, it is written to a queue. This way a slow or unreachable recipient does not slow down the main path.
The observability rule applies here too: if publishing fails, the run continues, the error is only logged.
Methods
Section titled “Methods”PublishAsync(string, string, WebhookEventPayload, CancellationToken)
Section titled “ PublishAsync(string, string, WebhookEventPayload, CancellationToken)”Writes an event to the queue.
ValueTask<int> PublishAsync(string tenantId, string eventType, WebhookEventPayload payload, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
eventType string
The event name. See WebhookEvents.
payload WebhookEventPayload
The event summary. Serialized and written to the body.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The number of deliveries created. 0 if there is no subscriber.