Safe Haskell | None |
---|---|
Language | Haskell2010 |
- kafkaSink :: MonadResource m => ProducerProperties -> Sink ProducerRecord m (Maybe KafkaError)
- kafkaSinkAutoClose :: MonadResource m => KafkaProducer -> Sink ProducerRecord m (Maybe KafkaError)
- kafkaSinkNoClose :: MonadIO m => KafkaProducer -> Sink ProducerRecord m (Maybe KafkaError)
- kafkaBatchSinkNoClose :: MonadIO m => KafkaProducer -> Sink [ProducerRecord] m [(ProducerRecord, KafkaError)]
- commitOffsetsSink :: MonadIO m => KafkaConsumer -> Sink i m ()
- flushThenCommitSink :: MonadIO m => KafkaConsumer -> KafkaProducer -> Sink i m ()
Documentation
kafkaSink :: MonadResource m => ProducerProperties -> Sink ProducerRecord m (Maybe KafkaError) Source #
Creates a kafka producer for given properties and returns a Sink.
This method of creating a Sink represents a simple case
and does not provide access to KafkaProducer
. For more complex scenarious
kafkaSinkAutoClose
or kafkaSinkNoClose
can be used.
kafkaSinkAutoClose :: MonadResource m => KafkaProducer -> Sink ProducerRecord m (Maybe KafkaError) Source #
Creates a Sink for a given KafkaProducer
.
The producer will be closed when the Sink is closed.
kafkaSinkNoClose :: MonadIO m => KafkaProducer -> Sink ProducerRecord m (Maybe KafkaError) Source #
Creates a Sink for a given KafkaProducer
.
The producer will NOT be closed automatically.
kafkaBatchSinkNoClose :: MonadIO m => KafkaProducer -> Sink [ProducerRecord] m [(ProducerRecord, KafkaError)] Source #
Creates a batching Sink for a given KafkaProducer
.
The producer will NOT be closed automatically.
commitOffsetsSink :: MonadIO m => KafkaConsumer -> Sink i m () Source #
Deprecated: Conceptually wrong thing to do. Does not require library support. Consider calling commitAllOffsets
when appropriate.
Ignores incoming messages and commits offsets. Commit errors are ignored. This functionality should not exist as a Sink and will be removed in future versions. Consider having an effect instead:
mapMC (\_ -> commitAllOffsets OffsetCommit consumer)
flushThenCommitSink :: MonadIO m => KafkaConsumer -> KafkaProducer -> Sink i m () Source #
Deprecated: Conceptually wrong thing to do. Does not require library support. Consider calling 'flushProducer >>= commitAllOffsets' when appropriate.
Ignores incoming messages and commits offsets, but makes sure that producer
has an empty outgoing queue.
Commit errors are ignored.
This functionality should not exist as a Sink and will be removed in future versions.
Consider having an effect instead:
mapMC (\_ -> flushProducer producer >>= commitAllOffsets OffsetCommit consumer)