Struct nakadion::consumer::Consumer [−][src]
pub struct Consumer { /* fields omitted */ }
The consumer connects to the stream using a StreamingClient
and then
iterates over the batches.
The consumer also manages connection attempts to the stream and reconnect.
This is the main component consuming batches and instatiation helper components for each newly connected stream.
The consumer creates a background thread.
Methods
impl Consumer
[src]
impl Consumer
pub fn start<C, A, HF, M>(
streaming_client: C,
api_client: A,
subscription_id: SubscriptionId,
handler_factory: HF,
commit_strategy: CommitStrategy,
metrics_collector: M,
min_idle_worker_lifetime: Option<Duration>
) -> Consumer where
C: StreamingClient + Clone + Send + 'static,
A: ApiClient + Clone + Send + 'static,
HF: HandlerFactory + Send + Sync + 'static,
M: MetricsCollector + Clone + Sync + Send + 'static,
[src]
pub fn start<C, A, HF, M>(
streaming_client: C,
api_client: A,
subscription_id: SubscriptionId,
handler_factory: HF,
commit_strategy: CommitStrategy,
metrics_collector: M,
min_idle_worker_lifetime: Option<Duration>
) -> Consumer where
C: StreamingClient + Clone + Send + 'static,
A: ApiClient + Clone + Send + 'static,
HF: HandlerFactory + Send + Sync + 'static,
M: MetricsCollector + Clone + Sync + Send + 'static,
Start a new Consumer
pub fn running(&self) -> bool
[src]
pub fn running(&self) -> bool
pub fn stop(&self)
[src]
pub fn stop(&self)