-
-
Save auryn31/afe28ada69a5f913693b7d3ba34bcc56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val config_producer = HashMap<String, String>() | |
config_producer["bootstrap.servers"] = "kafka:9092" | |
config_producer["key.serializer"] = "org.apache.kafka.common.serialization.StringSerializer" | |
config_producer["value.serializer"] = "org.apache.kafka.common.serialization.StringSerializer" | |
config_producer["acks"] = "1" | |
val producer: KafkaProducer<String, String> = KafkaProducer.create(vertx, config_producer) | |
val record: KafkaProducerRecord<String, String> = KafkaProducerRecord.create("kafkaqueue", "content") | |
producer.write(record) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment