Module nakadion::consumer[][src]

Expand description

A consumer for a subscription

Start here if you want to consume a stream. You will need a BatchHandlerFactory to consume a stream.

The consumer instantiates handlers to process events and manages cursor commits.

Re-exports

pub use crate::instrumentation::Instrumentation;
pub use crate::instrumentation::MetricsDetailLevel;
pub use crate::instrumentation::Instrumentation;
pub use crate::instrumentation::MetricsDetailLevel;

Modules

Structs

Creates a Consumer

The time a publish attempt for an events batch may take.

Configuration for a Committer

The initial delay between retry attempts.

The maximum interval between retries.

The multiplier for the delay increase between retries.

If true, retries are done on auth errors.

The publishing an events batch including retries may take.

If true abort the consumer when an auth error occurs while connecting to a stream.

If true abort the consumer when a subscription does not exist when connection to a stream.

The timeout for a single request made to Nakadi to connect to a stream.

Parameters to configure the Connector

The maximum retry delay between failed attempts to connect to a stream.

The maximum time for connecting to a stream.

Consumes an event stream

Always leads to Nakadion shutting down

A handle for controlling a Consumer from externally.

A Future that completes once the consumer stopped events consumption

Returned once a Consumer has stopped. It contains the original consumer and a ConsumerAbort which gives more insight on why the consumer was stopped.

If true debug logging is enabled.

Does no logging at all

An error for cases where further investigation is not necessary.

The time after which a handler is considered inactive.

Configures which contextual data should be made available with a log message

A logger based on log

Instrumentation with Metrix

The time after which a partition is considered inactive.

A building block for grouping

A logger based on slog

Logs to stderr

Logs to stdout

Maximum time in seconds to wait for the flushing of each chunk (per partition).

Maximum number of Events in each chunk (and therefore per partition) of the stream.

Useful for batching events based on their received_at timestamp.

The id of this stream generated by Nakadi.

Maximum number of Events in this stream (over all partitions being streamed in this connection).

The maximum number of uncommitted events that Nakadi will stream before pausing the stream.

Parameters for starting a new stream on a subscription

Maximum time in seconds a stream will live before connection is closed by the server.

Id of subscription that was created.

The internal tick interval.

Emits a warning when no events were received from Nakadi.

Emits a warning when no frames (lines) were received from Nakadi.

Enums

Defines how to commit cursors

The timeout for a request made to Nakadi to connect to a stream including retries

Defines how to dispatch batches to handlers.

Defines the level of context being logged

Configures the logging for partition events.

Specifies when a stream is considered dead and has to be aborted.

Traits

Implementors can group everything that can process TelemetryMessages.

An adapter for pluggable logging.