Skip to content

feat: Outbox Inspector Minimal API endpoints (MapOutboxInspector) #290

@samtrion

Description

@samtrion

User Story

As a developer or operator monitoring the Pulse Outbox in production, I want minimal API endpoints for inspecting outbox messages and dead-letters, so that I can diagnose stuck messages, trigger replays, and dismiss failures without direct database access.


Requirements

  • Create OutboxInspectorOptions: BasePath = "/pulse/outbox", RouteGroupName = "Pulse Outbox Inspector".
  • Create OutboxInspectorEndpoints (static class):
    • GET {base}/stats → IOutboxManagement.GetStatisticsAsync()
    • GET {base}/messages?count=50&skip=0 → IOutboxManagement.GetPendingAsync(count, skip)
    • GET {base}/messages/{id} → single message or 404
    • POST {base}/messages/{id}/replay → IOutboxManagement.ReplayAsync(id)
    • GET {base}/dead-letters → dead-letter list
    • POST {base}/dead-letters/{id}/dismiss → IOutboxManagement.DismissAsync(id)
    • POST {base}/dead-letters/replay-all → replay all dead-letters
  • Add MapOutboxInspector(this IEndpointRouteBuilder, Action? configure = null) returning IEndpointConventionBuilder.
  • No built-in authorization — user applies .RequireAuthorization() on the returned builder.

Acceptance Criteria

  • All seven endpoints respond with correct status codes.
  • MapOutboxInspector() returns IEndpointConventionBuilder for chaining.
  • BasePath is configurable via OutboxInspectorOptions.
  • Unit tests cover all endpoints with mocked IOutboxManagement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureIndicates a new feature or enhancement to be added.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions