46 releases

new 0.0.51 Apr 9, 2025
0.0.50 Mar 24, 2025
0.0.49 Feb 26, 2025
0.0.39 Nov 25, 2024
0.0.13 Mar 28, 2024

#692 in HTTP server

Download history 131/week @ 2024-12-31 317/week @ 2025-01-07 15/week @ 2025-01-14 72/week @ 2025-01-21 147/week @ 2025-01-28 207/week @ 2025-02-04 146/week @ 2025-02-11 197/week @ 2025-02-18 213/week @ 2025-02-25 30/week @ 2025-03-04 14/week @ 2025-03-11 74/week @ 2025-03-18 48/week @ 2025-03-25 6/week @ 2025-04-01 132/week @ 2025-04-08

264 downloads per month
Used in 2 crates

MIT license

17KB
415 lines

Quick Microservices Kafka - qm-kafka

utilities to work with Kafka events


GitHub repositoryCargo packageDocs

github.com - quick-microservice-rs crates.io - qm-kafka
github.com - workflow - build


Description

With this crate it is easy to get a Kafka configuration with the most common settings. It also provides common helpers for topics and defines event and event namespaces commonly used with the other features provided by this crate.

Usage

let kafka_config = qm::kafka::config::Config::new()?;

The Config is populated with environment variables. By default, all variables with the prefix KAFKA_ are considered.

The prefix can be changed by using a builder pattern.

let example_config = qm::kafka::config::Config::builder().with_prefix("EXAMPLE_").build()?;

Variables and Defaults

These variables are available and are set with the following defaults.

variable struct field default
KAFKA_HOST host "127.0.0.1"
KAFKA_PORT port 9092
address {host}:{port}
KAFKA_TOPIC_MUTATION_EVENTS topic_mutation_events "qm_mutation_events"
KAFKA_CONSUMER_GROUP_MUTATION_EVENTS_PREFIX consumer_group_mutation_events_prefix "qm_consumer_group"

Dependencies

~14–21MB
~242K SLoC