Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeee committed Nov 12, 2024
1 parent bf40508 commit 06d654d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,18 @@ EOF

RUN chmod +x /startup.sh

ENV KAFKA_NODE_ID=1
ENV KAFKA_PROCESS_ROLES=broker,controller
ENV KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
ENV KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
ENV KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
ENV KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
ENV KAFKA_CONTROLLER_QUORUM_VOTERS=1@localhost:9093
ENV KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT
ENV KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
ENV KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
ENV KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1


# Kafka configuration
ENV KAFKA_NODE_ID=1 \
KAFKA_PROCESS_ROLES=broker,controller \
KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \
KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER \
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT \
KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 \
KAFKA_CONTROLLER_QUORUM_VOTERS=1@localhost:9093 \
KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT \
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 \
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1

# Expose Kafka port
EXPOSE 9092
Expand Down
1 change: 1 addition & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ datafusion = { workspace = true }
arrow = { workspace = true, features = ["prettyprint"] }
arrow-schema = { workspace = true }
arrow-array = { workspace = true }
anyhow = "1.0.86"
tracing = { workspace = true }
futures = { workspace = true }
tracing-log = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions examples/examples/emit_measurements.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use rand::seq::SliceRandom;
use rdkafka::producer::FutureProducer;
use std::time::{SystemTime, UNIX_EPOCH};
use std::result::Result;

use rdkafka::config::ClientConfig;
use rdkafka::producer::FutureRecord;
use rdkafka::producer::FutureProducer;

use denormalized::prelude::*;
use denormalized_examples::Measurment;

/// This script emits test data to a kafka cluster
Expand All @@ -14,7 +14,7 @@ use denormalized_examples::Measurment;
/// Sample sensor data will then be emitted to two topics: `temperature` and `humidity`
/// This data is read processed by other exmpales
#[tokio::main]
async fn main() -> Result<()> {
async fn main() -> Result<(), anyhow::Error> {
let mut tasks = tokio::task::JoinSet::new();

let producer: FutureProducer = ClientConfig::new()
Expand Down

0 comments on commit 06d654d

Please sign in to comment.