packages feed

hw-kafka-client 2.1.2 → 2.1.3

raw patch · 5 files changed

+9/−10 lines, 5 files

Files

example/ConsumerExample.hs view
@@ -34,12 +34,8 @@     mapM_ (\_ -> do                    msg1 <- pollMessage kafka (Timeout 1000)                    putStrLn $ "Message: " <> show msg1-                   case msg1 of-                        Right _ -> do-                            err <- commitAllOffsets OffsetCommit kafka-                            putStrLn $ "Offsets: " <> maybe "Committed." show err-                        Left _ -> return ()-+                   err <- commitAllOffsets OffsetCommit kafka+                   putStrLn $ "Offsets: " <> maybe "Committed." show err           ) [0 :: Integer .. 10]     return $ Right () 
hw-kafka-client.cabal view
@@ -1,5 +1,5 @@ name:                hw-kafka-client-version:             2.1.2+version:             2.1.3 homepage:            https://github.com/haskell-works/hw-kafka-client bug-reports:         https://github.com/haskell-works/hw-kafka-client/issues license:             MIT
src/Kafka/Consumer.hs view
@@ -42,7 +42,7 @@  -- | Runs high-level kafka consumer. -- A callback provided is expected to call 'pollMessage' when convenient.-{-# DEPRECATED runConsumer "Use @newConsumer@/@closeConsumer@ instead" #-}+{-# DEPRECATED runConsumer "Use newConsumer/closeConsumer instead" #-} runConsumer :: ConsumerProperties             -> Subscription             -> (KafkaConsumer -> IO (Either KafkaError a))  -- ^ A callback function to poll and handle messages
src/Kafka/Consumer/Convert.hs view
@@ -52,7 +52,10 @@     withForeignPtr ptr $ \fptr -> fromNativeTopicPartitionList' fptr  fromNativeTopicPartitionList' :: Ptr RdKafkaTopicPartitionListT -> IO [TopicPartition]-fromNativeTopicPartitionList' ppl = peek ppl >>= fromNativeTopicPartitionList+fromNativeTopicPartitionList' ppl =+    if ppl == nullPtr+        then return []+        else peek ppl >>= fromNativeTopicPartitionList  fromNativeTopicPartitionList :: RdKafkaTopicPartitionListT -> IO [TopicPartition] fromNativeTopicPartitionList pl =
src/Kafka/Producer.hs view
@@ -36,7 +36,7 @@ -- | Runs Kafka Producer. -- The callback provided is expected to call 'produceMessage' -- or/and 'produceMessageBatch' to send messages to Kafka.-{-# DEPRECATED runProducer "Use @newProducer@/@closeProducer@ instead" #-}+{-# DEPRECATED runProducer "Use newProducer/closeProducer instead" #-} runProducer :: ProducerProperties             -> (KafkaProducer -> IO (Either KafkaError a))             -> IO (Either KafkaError a)