Kafka provider for @mdf.js based on kafkajs.
Using npm:
npm install @mdf.js/kafka-provider
Using yarn:
yarn add @mdf.js/kafka-provider
Check information about @mdf.js providers in the documentation of the core module @mdf.js/core.
Checks included in the provider:
error
, running
, stopped
] based on the response, or not, to admin client requests. error
if there is errors during the requests, running
if the requests are successful, and stopped
if the instance has been stopped or not initialized.pass
if the status is running
, warn
if the status is stopped
, fail
if the status is error
.error
state (status fail
).topics
.pass
if the topics are available, fail
in other cases.No topics available
if the topics are not available.300000
): Maximum time in ms that the producer will wait for metadatatrue
): Allow auto topic creation60000
): Transaction timeout in msfalse
): Idempotent producerundefined
): Transactional idundefined
): Maximum number of in-flight requests300000
): Maximum time in ms that the producer will wait for metadata300
): Initial value used to calculate the retry in milliseconds (This is still randomized following the randomization factor)0.2
): A multiplier to apply to the retry time2
): A multiplier to apply to the retry time5
): Maximum number of retries per call'hostname()'
): Consumer group id30000
): The timeout used to detect consumer failures when using Kafka's group management facility. The consumer sends periodic heartbeats to indicate its liveness to the broker. If no heartbeats are received by the broker before the expiration of this session timeout, then the broker will remove this consumer from the group and initiate a rebalance.60000
): The maximum time that the coordinator will wait for each member to rejoin when rebalancing the group.3000
): The expected time between heartbeats to the consumer coordinator when using Kafka's group management facility. Heartbeats are used to ensure that the consumer's session stays active and to facilitate rebalancing when new consumers join or leave the group. The value must be set lower than sessionTimeout
, but typically should be set no higher than 1/3 of that value. It can be adjusted even lower to control the expected time for normal rebalances.300000
): The period of time in milliseconds after which we force a refresh of metadata even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions.true
): Allow automatic topic creation on the broker when subscribing to or assigning non-existing topics.1048576
): The maximum amount of data per-partition the server will return.1
): Minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait until some is available.10485760
): The maximum amount of data the server should return for a fetch request.5000
): The maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy minBytes
.30000
): Maximum time in milliseconds to wait for a successful retry300
): Initial value used to calculate the retry in milliseconds (This is still randomized following the randomization factor)0.2
): A multiplier to apply to the retry time2
): A multiplier to apply to the retry time5
): Maximum number of retries per callfalse
): Whether to read uncommitted messagesundefined
): Maximum number of in-flight requestsundefined
): The consumer will only be assigned partitions from the leader of the partition to which it is assigned.`error`
): Define the log level for the kafka provider, possible values are: - error
- warn
- info
- debug
- trace
hostname
): Client identifier'127.0.0.1:9092'
): Kafka brokers1000
): Time in milliseconds to wait for a successful connection1000
): Timeout in ms for authentication requests1000
): When periodic reauthentication (connections.max.reauth.ms) is configured on the broker side, reauthenticate when reauthenticationThreshold
milliseconds remain of session lifetime.30000
): Time in milliseconds to wait for a successful requesttrue
): The request timeout can be disabled by setting this value to false.30000
): Maximum time in milliseconds to wait for a successful retry300
): Initial value used to calculate the retry in milliseconds (This is still randomized following the randomization factor)0.2
): Randomization factor2
): Exponential factor5
): Maximum number of retries per callfalse
): Whether to use SSLtrue
): Whether to verify the SSL certificate.undefined
): Server name for the TLS certificate.undefined
): Path to the CA certificate.undefined
): Path to the client certificate.undefined
): Path to the client key.undefined
): SASL usernameundefined
): SASL passwordundefined
): Used as default container id, receiver name, sender name, etc. in cluster configurations.Copyright 2024 Mytra Control S.L. All rights reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.