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

Safe HaskellNone
LanguageHaskell2010

Kafka.Consumer.Subscription

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