Skip to content

Commit 62be64c

Browse files
Cleanup (#3)
* added license header fixed fail on javadoc task * change from CR * Uniform readme * Update gradle to 6.6.1
1 parent 7d6ac65 commit 62be64c

File tree

11 files changed

+79
-30
lines changed

11 files changed

+79
-30
lines changed

README.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
:hivemq-kafka-docs-link: https://www.hivemq.com/docs/kafka/latest/enterprise-extension-for-kafka/kafka.html
2-
:hivemq-kafka-customization-docs-link: https://www.hivemq.com/docs/kafka/latest/enterprise-extension-for-kafka/kafka.html#customization
3-
:hivemq-blog-tools: http://www.hivemq.com/mqtt-toolbox
1+
:hivemq-link: https://www.hivemq.com
2+
:hivemq-kafka-docs: {hivemq-link}/docs/kafka/latest/enterprise-extension-for-kafka/kafka.html
3+
:hivemq-kafka-customization-docs: {hivemq-link}/docs/kafka/latest/enterprise-extension-for-kafka/kafka-customization.html
4+
:hivemq-blog-tools: {hivemq-link}/mqtt-toolbox/
45
:hivemq-support: https://community.hivemq.com/c/hivemq-extension-sdk/kafka-customization/14
56

67
= HiveMQ Kafka Extension Hello World Customization
78

8-
*Type*: Demonstration Customization
9+
*Customization Type*: Demonstration
910

1011
*Version*: 4.5.0
1112

12-
*License*: Apache License Version 2.0
13+
*License*: Apache License 2.0
1314

1415
== Purpose
1516

1617
This Hello World customizations uses a Mqtt-to-Kafka transformer which forwards MQTT PUBLISHES to a Kafka cluster.
1718
It maps the MQTT topic structure to a matching Kafka topic structure and preserves MQTT 4 user properties as Kafka record headers.
1819

19-
We strongly recommend reading the {hivemq-kafka-docs-link}[HiveMQ Enterprise Extension for Kafka Documentation]
20+
We strongly recommend reading the {hivemq-kafka-docs}[HiveMQ Enterprise Extension for Kafka Documentation]
2021
to grasp the core concepts of HiveMQ Kafka customization development.
2122

2223
== Installation
@@ -36,13 +37,13 @@ Connect with an {hivemq-blog-tools}[MQTT client] of your choice.
3637
Publish a MQTT message to the topic _transform/customization_.
3738
Monitor your Kafka cluster for a record from topic _transform.customization_.
3839

39-
== Next steps
40+
== Next Steps
4041

4142
Awesome, you got your first HiveMQ Kafka customization working.
4243

43-
Now read the {hivemq-kafka-customization-docs-link}[HiveMQ Kafka Extension Customization Documentation] to see what customizations can do.
44+
Now read the {hivemq-kafka-customization-docs}[HiveMQ Kafka Extension Customization Documentation] to see what customizations can do.
4445

45-
== Need help?
46+
== Need Help?
4647

4748
If you encounter any problems, we are happy to help.
4849
The best place to get in contact is our {hivemq-support}[community forum].

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ tasks.withType<Jar>().configureEach {
9797

9898
tasks.javadoc {
9999
title = "${metadata.readableName} ${project.version} API"
100+
isFailOnError = false
100101
}
101102

102103
/* ******************** checks ******************** */

gradle/wrapper/gradle-wrapper.jar

293 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fi
130130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133-
133+
134134
JAVACMD=`cygpath --unix "$JAVACMD"`
135135

136136
# We build the pattern for arguments to be converted via cygpath

gradlew.bat

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
5454
set JAVA_HOME=%JAVA_HOME:"=%
5555
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5656

57-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
5858

5959
echo.
6060
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,29 +64,14 @@ echo location of your Java installation.
6464

6565
goto fail
6666

67-
:init
68-
@rem Get command-line arguments, handling Windows variants
69-
70-
if not "%OS%" == "Windows_NT" goto win9xME_args
71-
72-
:win9xME_args
73-
@rem Slurp the command line arguments.
74-
set CMD_LINE_ARGS=
75-
set _SKIP=2
76-
77-
:win9xME_args_slurp
78-
if "x%~1" == "x" goto execute
79-
80-
set CMD_LINE_ARGS=%*
81-
8267
:execute
8368
@rem Setup the command line
8469

8570
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8671

8772

8873
@rem Execute Gradle
89-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
9075

9176
:end
9277
@rem End local scope for the variables with windows NT shell

src/main/java/com/hivemq/extensions/kafka/customizations/helloworld/KafkaToMqttHelloWorldTransformer.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2020-present HiveMQ GmbH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.hivemq.extensions.kafka.customizations.helloworld;
217

318
import com.codahale.metrics.Counter;

src/main/java/com/hivemq/extensions/kafka/customizations/helloworld/KafkaTopicUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private KafkaTopicUtil() {}
3535
*
3636
* @param mqttTopic a single or multilevel MQTT topic
3737
* @return a single or multilevel Kafka topic
38-
* @see <a href=" https://stackoverflow.com/questions/37062904/what-are-apache-kafka-topic-name-limitations">What
38+
* @see <a href="https://stackoverflow.com/questions/37062904/what-are-apache-kafka-topic-name-limitations">What
3939
* are Apache Kafka topic name limitations?</a>
4040
*/
4141
public static @NotNull String mqttToKafkaTopic(final @NotNull String mqttTopic) {

src/main/resources/kafka-configuration.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
4+
Copyright 2020-present HiveMQ GmbH
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
219
<kafka-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
320
xsi:noNamespaceSchemaLocation="kafka-extension.xsd">
421

src/test/java/com/hivemq/extensions/kafka/customizations/helloworld/HelloWorldTransformerTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2020-present HiveMQ GmbH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.hivemq.extensions.kafka.customizations.helloworld;
217

318
import com.hivemq.extension.sdk.api.packets.general.UserProperties;

0 commit comments

Comments
 (0)