Interface MqttToKafkaTransformer
-
- All Superinterfaces:
Transformer<MqttToKafkaInitInput>
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)methods.- Since:
- 4.4.0
-
-