Interface KafkaToMqttOutput
-
@DoNotImplement public interface KafkaToMqttOutput
The output parameter of theKafkaToMqttTransformer. It allows access to thePublishBuilder.After the
KafkaToMqttTransformer.transformKafkaToMqtt(KafkaToMqttInput, KafkaToMqttOutput)method returns thePublishes given to this output will be published by HiveMQ.- Since:
- 4.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull PublishBuildernewPublishBuilder()voidsetPublishes(@NotNull List<@NotNull Publish> publishes)Sets thePublishes, that will be published by HiveMQ after theKafkaToMqttTransformer.transformKafkaToMqtt(KafkaToMqttInput, KafkaToMqttOutput)call returns.
-
-
-
Method Detail
-
newPublishBuilder
@NotNull @NotNull PublishBuilder newPublishBuilder()
- Returns:
- A new
PublishBuilder. - Since:
- 4.5.0
-
setPublishes
void setPublishes(@NotNull @NotNull List<@NotNull Publish> publishes)
Sets thePublishes, that will be published by HiveMQ after theKafkaToMqttTransformer.transformKafkaToMqtt(KafkaToMqttInput, KafkaToMqttOutput)call returns. The "HiveMQ Enterprise Extension for Kafka" will publish these publishes in the order provided by thepublishesargument.If desired, the same publish can occupy multiple places in the
publisheslist. When no publish shall be published by HiveMQ for aKafkaRecord, call this method with an empty list.Use the
PublishBuilderto create new publishes as desired.Each additional call of this method will overwrite the previous one.
- Parameters:
publishes- A list of to be publishedPublishes.- Throws:
NullPointerException- Ifpublishesor any element of it is null.IllegalArgumentException- If any element inpublisheswas not created via aPublishBuilder.- Since:
- 4.5.0
-
-