Interface KafkaToMqttOutput
-
@DoNotImplement public interface KafkaToMqttOutput
The output parameter of theKafkaToMqttTransformer
. It allows access to thePublishBuilder
.After the
KafkaToMqttTransformer.transformKafkaToMqtt(KafkaToMqttInput, KafkaToMqttOutput)
method returns thePublish
es 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 PublishBuilder
newPublishBuilder()
void
setPublishes(@NotNull List<@NotNull Publish> publishes)
Sets thePublish
es, 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 thePublish
es, 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 thepublishes
argument.If desired, the same publish can occupy multiple places in the
publishes
list. When no publish shall be published by HiveMQ for aKafkaRecord
, call this method with an empty list.Use the
PublishBuilder
to create new publishes as desired.Each additional call of this method will overwrite the previous one.
- Parameters:
publishes
- A list of to be publishedPublish
es.- Throws:
NullPointerException
- Ifpublishes
or any element of it is null.IllegalArgumentException
- If any element inpublishes
was not created via aPublishBuilder
.- Since:
- 4.5.0
-
-