Path: redb-route/redb.Route/Abstractions/IConsumer.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Abstractions/IConsumer.cs
----
namespace redb.Route.Abstractions;
///
/// Receives messages from an endpoint and delegates to a processor.
/// Manages its own lifecycle (polling, subscribing, etc.).
///
public interface IConsumer
{
/// The endpoint this consumer is attached to (for diagnostics/logging).
IEndpoint? Endpoint => null;
/// Starts consuming messages.
/// Cancellation token.
Task Start(CancellationToken ct = default);
/// Stops consuming messages.
/// Cancellation token.
Task Stop(CancellationToken ct = default);
}