ipa-digitools / simple-kafka-mqtt-connector Goto Github PK
View Code? Open in Web Editor NEWThis application receives messages from a mqtt broker and sends the messages to a kafka cluster. Topic mapping is configurable.
License: Apache License 2.0
This application receives messages from a mqtt broker and sends the messages to a kafka cluster. Topic mapping is configurable.
License: Apache License 2.0
There is a bug, if you are using this string as an input for your env-variable:
'/Test>>>Mqtt_Test1_SSL;/Test2>>>Mqtt_Test2_SSL;'
a exception will be thrown and the programm crashes, because of the semicolon at the end. You should consider checking that.
Hi,
I'm having trouble getting messages from mqtt-connector to kafka.
I'm seeing messages appear in the logs from the MQTT server and attempts to write to kafka:
[2020-05-13 19:13:51,451] (org.apache.kafka.clients.NetworkClient) - WARN [Producer clientId=simple-kafka-mqtt-connector-1] Connection to node 1008 (kafka/172.18.0.3:29092) could not be established. Broker may not be available.
[2020-05-13 19:13:52,410] (org.apache.kafka.clients.NetworkClient) - WARN [Producer clientId=simple-kafka-mqtt-connector-1] Connection to node 1008 (kafka/172.18.0.3:29092) could not be established. Broker may not be available.
[2020-05-13 19:13:53,268] (org.apache.kafka.clients.NetworkClient) - WARN [Producer clientId=simple-kafka-mqtt-connector-1] Connection to node 1008 (kafka/172.18.0.3:29092) could not be established. Broker may not be available.
[2020-05-13 19:15:43,546] (de.fhg.ipa.null70.simple_kafka_mqtt_connector.SimpleKafkaMQTTConnector) - INFO andf99-topic - wtf7
[2020-05-13 19:15:43,560] (org.apache.kafka.clients.NetworkClient) - WARN [Producer clientId=simple-kafka-mqtt-connector-1] 1 partitions have leader brokers without a matching listener, including [replication-in-0]
[2020-05-13 19:15:43,661] (org.apache.kafka.clients.NetworkClient) - WARN [Producer clientId=simple-kafka-mqtt-connector-1] 1 partitions have leader brokers without a matching listener, including [replication-in-0]
Does mqtt-connector attempt to connect to kafka on startup? I don't see connection errors til it receives a message from the mqtt server.
I'm using docker-compose to try and get this working. Config:
kafka:
image: wurstmeister/kafka:2.11-2.0.0
ports:
- "9092:9092"
- "29094:29094"
expose:
- "29092"
environment:
KAFKA_LISTENERS: BOB://0.0.0.0:29092, FRED://0.0.0.0:9092, ALICE://0.0.0.0:29094
KAFKA_ADVERTISED_LISTENERS: BOB://kafka:29092,FRED://localhost:9092,ALICE://192.168.1.98:29094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BOB:PLAINTEXT, FRED:PLAINTEXT, ALICE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: BOB
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
#######
########
#KAFKA_HOST=kafka
KAFKA_HOST=kafka
KAFKA_PORT=29092
KAFKA_CLIENT_ID=simple-kafka-mqtt-connector-1
MQTT_HOST=broker.hivemq.com
MQTT_PORT=1883
MQTT_CLIENT_ID=simple-kafka-mqtt-connector-1
MQTT_QOS=2
#!EDITME! mqttTopicA>>>kafkaTopicA;mqttTopicB>>>kafkaTopicB;mqttTopicC>>>kafkaTopicC
#TOPIC_MAPPING=robotgroup001/robot001>>>test;robotgroup001/robot002>>>test02;robotgroup001/robot003>>>test03
TOPIC_MAPPING=andf99-topic>>>replication-in
~
Thanks,
Andy
Currently no wildcards are supported for your MQTT-Topics.
This feature would be really helpful for other users.
First of all, thank you for the great tool :)
I had the connector seamlessly running as a docker container during the last days. I pulled it directly from DockerHub and it worked just fine. To apply some changes to adapt the tool to my needs (I haven't changed anything yet), I cloned the repo, built it with maven and tried to started it locally with docker-compose. But now, I get the error sed: can't read /app/kafka-mqtt-connector/application.properties
that originates from setConfiguration.sh file. I'm running docker on Windows 10.
Do you have any idea where this might be coming from? Thanks in advance for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.