Interface MqttToKafkaTransformer
-
- All Superinterfaces:
Transformer<MqttToKafkaInitInput>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MqttToKafkaTransformer extends Transformer<MqttToKafkaInitInput>
Implement this transformer for the programmatic creation ofKafkaRecords fromPublishPackets.Your implementation of the MqttToKafkaTransformer must be placed in a java archive (.jar) together with all its dependencies in the
customizationsfolder of the "HiveMQ Enterprise Extension for Kafka". In addition, a<mqtt-to-kafka-transformer>referencing the implementing class via its canonical name must be configured in thekafka-extension.xmlfile.- Since:
- 4.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidtransformMqttToKafka(@NotNull MqttToKafkaInput input, @NotNull MqttToKafkaOutput output)This callback is executed for every MQTT PUBLISH that arrives at your HiveMQ cluster matching the in the<mqtt-to-kafka-transformer>tag configured<mqtt-topic-filters>.-
Methods inherited from interface com.hivemq.extensions.kafka.api.transformers.Transformer
init
-
-
-
-
Method Detail
-
transformMqttToKafka
void transformMqttToKafka(@NotNull @NotNull MqttToKafkaInput input, @NotNull @NotNull MqttToKafkaOutput output)
This callback is executed for every MQTT PUBLISH that arrives at your HiveMQ cluster matching the in the<mqtt-to-kafka-transformer>tag configured<mqtt-topic-filters>. It allows the publication of any number ofKafkaRecords via theMqttToKafkaOutputobject.- Parameters:
input- TheMqttToKafkaInputcontains the triggeringPublishPacketand theKafkaClusterinformation. TheKafkaTopicServicecan be accessed.output- Pass the list of newKafkaRecords to theMqttToKafkaOutput.setKafkaRecords(List)method.- Since:
- 4.4.0
-
-