Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ConsumerProperties = ConsumerProperties {}
- consumerBrokersList :: [BrokerAddress] -> ConsumerProperties
- noAutoCommit :: ConsumerProperties
- groupId :: ConsumerGroupId -> ConsumerProperties
- clientId :: ClientId -> ConsumerProperties
- reballanceCallback :: ReballanceCallback -> ConsumerProperties
- offsetsCommitCallback :: OffsetsCommitCallback -> ConsumerProperties
- consumerLogLevel :: KafkaLogLevel -> ConsumerProperties
- consumerCompression :: KafkaCompressionCodec -> ConsumerProperties
- extraConsumerProps :: Map String String -> ConsumerProperties
- consumerDebug :: [KafkaDebug] -> ConsumerProperties
Documentation
noAutoCommit :: ConsumerProperties Source #
Disables auto commit for the consumer
groupId :: ConsumerGroupId -> ConsumerProperties Source #
Consumer group id
reballanceCallback :: ReballanceCallback -> ConsumerProperties Source #
Sets a callback that is called when rebalance is needed.
Callback implementations suppose to watch for KafkaResponseError
RdKafkaRespErrAssignPartitions
and
for KafkaResponseError
RdKafkaRespErrRevokePartitions
. Other error codes are not expected and would indicate
something really bad happening in a system, or bugs in librdkafka
itself.
A callback is expected to call assign
according to the error code it receives.
- When
RdKafkaRespErrAssignPartitions
happensassign
should be called with all the partitions it was called with. It is OK to alter partitions offsets before callingassign
. - When
RdKafkaRespErrRevokePartitions
happensassign
should be called with an empty list of partitions.
offsetsCommitCallback :: OffsetsCommitCallback -> ConsumerProperties Source #
Sets offset commit callback for use with consumer groups.
The results of automatic or manual offset commits will be scheduled
for this callback and is served by pollMessage
.
A callback is expected to call assign
according to the error code it receives.
If no partitions had valid offsets to commit this callback will be called
with KafkaError
== KafkaResponseError
RdKafkaRespErrNoOffset
which is not to be considered
an error.
consumerLogLevel :: KafkaLogLevel -> ConsumerProperties Source #
Sets the logging level.
Usually is used with consumerDebug
to configure which logs are needed.
consumerCompression :: KafkaCompressionCodec -> ConsumerProperties Source #
Sets the compression codec for the consumer.
extraConsumerProps :: Map String String -> ConsumerProperties Source #
Any configuration options that are supported by librdkafka. The full list can be found here
consumerDebug :: [KafkaDebug] -> ConsumerProperties Source #
Sets debug features for the consumer.
Usually is used with consumerLogLevel
.