nakadi-client-0.5.1.0: Client library for the Nakadi Event Broker

Copyright(c) Moritz Clasmeier 2017 2018
LicenseBSD3
Maintainermtesseract@silverratio.net
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Nakadi.Subscriptions.Events

Description

This module implements a high level interface for the /subscriptions/SUBSCRIPTIONS/events API.

Synopsis

Documentation

subscriptionProcessConduit Source #

Arguments

:: (MonadNakadi b m, MonadUnliftIO m, MonadMask m, FromJSON a, batch ~ SubscriptionEventStreamBatch a) 
=> Maybe ConsumeParameters

ConsumeParameters to use

-> SubscriptionId

Subscription to consume

-> ConduitM batch batch m ()

Conduit processor.

-> m () 

Conduit based interface for subscription consumption. Consumes the specified subscription using the commit strategy contained in the configuration. Each consumed event batch is then processed by the provided conduit. If an exception is thrown inside the conduit, subscription consumption will terminate.

subscriptionProcess Source #

Arguments

:: (MonadNakadi b m, MonadUnliftIO m, MonadMask m, FromJSON a) 
=> Maybe ConsumeParameters

ConsumeParameters to use

-> SubscriptionId

Subscription to consume

-> (SubscriptionEventStreamBatch a -> m ())

Batch processor action

-> m () 

Consumes the specified subscription using the commit strategy contained in the configuration. Each consumed batch of subscription events is provided to the provided batch processor action. If this action throws an exception, subscription consumption will terminate.