coreon-kafka 0.1.0

kafka:* component for camel-rs (producer + consumer via rdkafka).
Documentation

kafka:* — Kafka producer and consumer.

URI: kafka:<topic>?brokers=host:9092&group_id=my-app&auto_offset_reset=earliest

  • Producer: publishes exchange.in.body bytes to <topic>. Optional CamelKafkaKey header controls the record key.
  • Consumer: subscribes to <topic> with group_id, emits one Exchange per consumed record. Consumer task is aborted on stop; auto-commit keeps offsets moving forward.

Backend: this crate wraps [rdkafka] behind the optional rdkafka-backend feature. rdkafka compiles librdkafka from source using CMake and needs libcurl-dev installed. Without the feature, the component still exists but returns an error at endpoint creation so the workspace builds in environments without libcurl.

Tests: marked #[ignore] unless KAFKA_BROKERS env var is set. Bring a local broker (e.g. docker run -p 9092:9092 apache/kafka:3.8.0) then run KAFKA_BROKERS=localhost:9092 cargo test -p camel-kafka --features rdkafka-backend -- --ignored.