Class MessagingTransformer<K,​V,​R>

  • Type Parameters:
    K - the key type.
    V - the value type.
    R - the result value type.
    All Implemented Interfaces:
    org.apache.kafka.streams.kstream.Transformer<K,​V,​org.apache.kafka.streams.KeyValue<K,​R>>

    public class MessagingTransformer<K,​V,​R>
    extends java.lang.Object
    implements org.apache.kafka.streams.kstream.Transformer<K,​V,​org.apache.kafka.streams.KeyValue<K,​R>>
    A Transformer implementation that invokes a MessagingFunction converting to/from spring-messaging Message. Can be used, for example, to invoke a Spring Integration flow.
    Since:
    2.3
    Author:
    Gary Russell
    • Method Detail

      • init

        public void init​(org.apache.kafka.streams.processor.ProcessorContext context)
        Specified by:
        init in interface org.apache.kafka.streams.kstream.Transformer<K,​V,​R>
      • transform

        public org.apache.kafka.streams.KeyValue<K,​R> transform​(K key,
                                                                      V value)
        Specified by:
        transform in interface org.apache.kafka.streams.kstream.Transformer<K,​V,​R>
      • close

        public void close()
        Specified by:
        close in interface org.apache.kafka.streams.kstream.Transformer<K,​V,​R>