Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module with subscription types and functions.
Synopsis
- data Subscription = Subscription (Set TopicName) (Map Text Text)
- topics :: [TopicName] -> Subscription
- offsetReset :: OffsetReset -> Subscription
- extraSubscriptionProps :: Map Text Text -> Subscription
Documentation
data Subscription Source #
A consumer subscription to a topic.
Examples
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")])
Instances
Semigroup Subscription Source # | |
Defined in Kafka.Consumer.Subscription (<>) :: Subscription -> Subscription -> Subscription # sconcat :: NonEmpty Subscription -> Subscription # stimes :: Integral b => b -> Subscription -> Subscription # | |
Monoid Subscription Source # | |
Defined in Kafka.Consumer.Subscription mempty :: Subscription # mappend :: Subscription -> Subscription -> Subscription # mconcat :: [Subscription] -> Subscription # |
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