Skip to content

Commit 5a38e76

Browse files
committed
Synced 4.4 with 4.5
1 parent aa62270 commit 5a38e76

File tree

8 files changed

+28
-10
lines changed

8 files changed

+28
-10
lines changed

README.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,11 @@ To use the SDK, add the following dependency to your Maven project:
3131

3232
The HiveMQ Kafka Extension SDK is licensed under the `APACHE LICENSE, VERSION 2.0`.
3333
A copy of the license can be found link:LICENSE[here].
34+
35+
== Setup
36+
To be able to use the latest changes of the `hivemq-extension-sdk` please check out the https://github.com/hivemq/hivemq-extension-sdk repository in the same folder as the current project.
37+
(See line `includeBuild("../hivemq-extension-sdk")` in `settings.gradle.kts`).
38+
39+
NOTE: You can also change the path in the `settings.gradle.kts` to the path of your `hivemq-extension-sdk`.
40+
41+
Otherwise, it will not be possible to publish develop snapshots to your local repository.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ tasks.withType<Jar>().configureEach {
9191

9292
tasks.javadoc {
9393
title = "${metadata.readableName} ${project.version} API"
94-
94+
isFailOnError = false
9595
doLast { // javadoc search fix for jdk 11 https://bugs.openjdk.java.net/browse/JDK-8215291
9696
copy {
9797
from("${buildDir}/docs/javadoc/search.js")

settings.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ pluginManagement {
99
}
1010

1111
rootProject.name = "hivemq-kafka-extension-customization-sdk"
12+
13+
if (file("../hivemq-extension-sdk").exists()) {
14+
if (gradle.parent == null) { // not part of a composite build
15+
includeBuild("../hivemq-extension-sdk")
16+
}
17+
}

src/main/java/com/hivemq/extensions/kafka/api/model/KafkaHeader.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.hivemq.extensions.kafka.api.model;
1718

1819
import com.hivemq.extension.sdk.api.annotations.DoNotImplement;
@@ -52,11 +53,11 @@ public interface KafkaHeader {
5253
* @return the value of this header.
5354
* @since 4.4.0
5455
*/
55-
@NotNull byte[] getValueAsByteArray();
56+
byte @NotNull [] getValueAsByteArray();
5657

5758
/**
58-
* @return the value of this header as a string. {@link java.nio.charset.StandardCharsets#UTF_8} is used for the
59-
* decoding.
59+
* @return the value of this header as a string. {@link java.nio.charset.StandardCharsets#UTF_8 UTF_8} is used for
60+
* the decoding.
6061
* @since 4.4.0
6162
*/
6263
@NotNull String getValueAsString();

src/main/java/com/hivemq/extensions/kafka/api/services/KafkaTopicService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public interface KafkaTopicService {
9191
* @throws NullPointerException if {@code topics} is or contains null.
9292
* @since 4.4.0
9393
*/
94-
@NotNull Map<String, @NotNull KafkaTopicState> createKafkaTopics(@NotNull Set<@NotNull String> topics);
94+
@Immutable @NotNull Map<String, @NotNull KafkaTopicState> createKafkaTopics(@NotNull Set<@NotNull String> topics);
9595

9696
/**
9797
* KafkaTopicState encodes the current known state of a Kafka topic on the associated cluster.

src/main/java/com/hivemq/extensions/kafka/api/transformers/mqtttokafka/MqttToKafkaInput.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
public interface MqttToKafkaInput {
3838

3939
/**
40-
* @return the {@link KafkaTopicService} to interact with topics on the Kafka cluster.
40+
* @return the {@link PublishPacket} that triggered this transformer call.
4141
* @since 4.4.0
4242
*/
43-
@NotNull KafkaTopicService getKafkaTopicService();
43+
@NotNull PublishPacket getPublishPacket();
4444

4545
/**
46-
* @return the {@link PublishPacket} that triggered this transformer call.
46+
* @return the {@link KafkaTopicService} to interact with topics on the Kafka cluster.
4747
* @since 4.4.0
4848
*/
49-
@NotNull PublishPacket getPublishPacket();
49+
@NotNull KafkaTopicService getKafkaTopicService();
5050

5151
/**
5252
* @return the {@link KafkaCluster} this transformer is associated with.

src/main/java/com/hivemq/extensions/kafka/api/transformers/mqtttokafka/MqttToKafkaOutput.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.hivemq.extensions.kafka.api.transformers.mqtttokafka;
1718

1819
import com.hivemq.extension.sdk.api.annotations.DoNotImplement;

src/main/java/com/hivemq/extensions/kafka/api/transformers/mqtttokafka/MqttToKafkaTransformer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.hivemq.extensions.kafka.api.transformers.mqtttokafka;
1718

1819
import com.hivemq.extension.sdk.api.annotations.NotNull;
@@ -33,6 +34,7 @@
3334
* @author Georg Held
3435
* @since 4.4.0
3536
*/
37+
@FunctionalInterface
3638
public interface MqttToKafkaTransformer extends Transformer<MqttToKafkaInitInput> {
3739

3840
/**
@@ -44,7 +46,7 @@ public interface MqttToKafkaTransformer extends Transformer<MqttToKafkaInitInput
4446
* and the {@link com.hivemq.extensions.kafka.api.model.KafkaCluster} information. The {@link
4547
* com.hivemq.extensions.kafka.api.services.KafkaTopicService} can be accessed.
4648
* @param output pass the list of new {@link com.hivemq.extensions.kafka.api.model.KafkaRecord}s to the {@link
47-
* MqttToKafkaOutput#setKafkaRecords(List)} methods.
49+
* MqttToKafkaOutput#setKafkaRecords(List)} method.
4850
* @since 4.4.0
4951
*/
5052
void transformMqttToKafka(@NotNull MqttToKafkaInput input, @NotNull MqttToKafkaOutput output);

0 commit comments

Comments
 (0)