Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions hw-kafka-conduit.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.2

name: hw-kafka-conduit
version: 2.7.0
version: 3.0.0
synopsis: Conduit bindings for hw-kafka-client
homepage: https://github.com/haskell-works/hw-kafka-conduit
bug-reports: https://github.com/haskell-works/hw-kafka-conduit/issues
Expand Down Expand Up @@ -52,10 +52,9 @@ library
, bifunctors
, bytestring
, containers
, conduit
, conduit-extra
, conduit >= 1.3.4 && < 1.4
, exceptions
, hw-kafka-client >= 2.5
, hw-kafka-client >= 2.5 && < 5.1
, mtl
, resourcet
, transformers
Expand All @@ -73,7 +72,6 @@ test-suite kafka-client-conduit-test
, bytestring
, containers
, conduit
, conduit-extra
, extra
, hspec
, hw-kafka-client >= 2.5
Expand Down
19 changes: 1 addition & 18 deletions src/Kafka/Conduit/Sink.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Kafka.Conduit.Sink
( module X
, kafkaSink, kafkaSinkAutoClose, kafkaSinkNoClose, kafkaBatchSinkNoClose
, kafkaSink, kafkaSinkAutoClose, kafkaSinkNoClose
, commitOffsetsSink, flushThenCommitSink
) where

Expand Down Expand Up @@ -51,23 +51,6 @@ kafkaSinkNoClose prod = go
Nothing -> go
Just err -> return (Just err)

-- | Creates a batching Sink for a given `KafkaProducer`.
-- The producer will NOT be closed automatically.
kafkaBatchSinkNoClose :: MonadIO m
=> KafkaProducer
-> ConduitT [ProducerRecord] Void m [(ProducerRecord, KafkaError)]
kafkaBatchSinkNoClose prod = go
where
go = do
mbMsg <- await
case mbMsg of
Nothing -> return []
Just msgs -> do
res <- produceMessageBatch prod msgs
case res of
[] -> go
xs -> return xs

-- | Creates a kafka producer for given properties and returns a Sink.
--
-- This method of creating a Sink represents a simple case
Expand Down