Class ConsumerRecordsConverter

  • All Implemented Interfaces:
    MessageConverter, javax.enterprise.inject.spi.Prioritized

    @ApplicationScoped
    public class ConsumerRecordsConverter
    extends Object
    implements MessageConverter
    Convert an incoming Kafka batch message into a ConsumerRecords.
    • Constructor Detail

      • ConsumerRecordsConverter

        public ConsumerRecordsConverter()
    • Method Detail

      • canConvert

        public boolean canConvert​(Message<?> in,
                                  Type target)
        Description copied from interface: MessageConverter
        Checks whether this instance of converter can convert the given message in into a Message<T> with T being the type represented by target. When reactive messaging looks for a converter, it picks the first converter returning true for a given message.
        Specified by:
        canConvert in interface MessageConverter
        Parameters:
        in - the input message, not null
        target - the target type, generally the type ingested by a method
        Returns:
        true if the conversion is possible, false otherwise.