Code Monkey home page Code Monkey logo

ipa-digitools / simple-kafka-mqtt-connector Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 15.0 26.58 MB

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

Dockerfile 9.78% Shell 10.70% Java 79.52%
big-data docker fraunhofer fraunhofer-ipa internet-of-things iot java kafka kafka-connect kafka-connector kafka-mqtt-connector mosquitto-mqtt-broker mqtt mqtt-connector

simple-kafka-mqtt-connector's People

Contributors

agrg-ipa-070 avatar arthurgrigo avatar fossabot avatar kbaur avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simple-kafka-mqtt-connector's Issues

Bug empty key

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.

Msgs not going to Kafka

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'

#######

simple-kafka-mqtt-connector

########

!EDITME! IP THROUGH WHICH THE KAFKA BROKER WILL BE REACHED

#KAFKA_HOST=kafka
KAFKA_HOST=kafka

KAFKA_PORT=29092
KAFKA_CLIENT_ID=simple-kafka-mqtt-connector-1

!EDITME! IP THROUGH WHICH THE MQTT BROKER WILL BE REACHED

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

Feature including wildcards

Currently no wildcards are supported for your MQTT-Topics.
This feature would be really helpful for other users.

sed: can't read /app/kafka-mqtt-connector/application.properties

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.