hw-kafka-client-4.0.2: Kafka bindings for Haskell

Safe HaskellNone
LanguageHaskell2010

Kafka.Consumer.Subscription

Description

Module with subscription types and functions.

Synopsis

Documentation

data Subscription Source #

A consumer subscription to a topic.

Examples

Expand

Typically you don't call the constructor directly, but combine settings:

consumerSub :: Subscription
consumerSub = topics [TopicName "kafka-client-example-topic"]
           <> offsetReset Earliest
           <> extraSubscriptionProps (fromList [("prop1", "value 1"), ("prop2", "value 2")])

topics :: [TopicName] -> Subscription Source #

Build a subscription by giving the list of topic names only

offsetReset :: OffsetReset -> Subscription Source #

Build a subscription by giving the offset reset parameter only

extraSubscriptionProps :: Map Text Text -> Subscription Source #

Build a subscription by giving extra properties only