Class OutgoingKafkaRecord<K,​T>

    • Method Detail

      • from

        public static <K,​T> OutgoingKafkaRecord<K,​T> from​(org.eclipse.microprofile.reactive.messaging.Message<T> message)
      • ack

        public CompletionStage<Void> ack()
        Specified by:
        ack in interface org.eclipse.microprofile.reactive.messaging.Message<K>
      • getPayload

        public T getPayload()
        Specified by:
        getPayload in interface org.eclipse.microprofile.reactive.messaging.Message<K>
      • getHeaders

        public org.apache.kafka.common.header.Headers getHeaders()
        Specified by:
        getHeaders in interface KafkaRecord<K,​T>
      • getAck

        public Supplier<CompletionStage<Void>> getAck()
        Specified by:
        getAck in interface org.eclipse.microprofile.reactive.messaging.Message<K>
      • getMetadata

        public org.eclipse.microprofile.reactive.messaging.Metadata getMetadata()
        Specified by:
        getMetadata in interface org.eclipse.microprofile.reactive.messaging.Message<K>
      • withHeader

        public OutgoingKafkaRecord<K,​T> withHeader​(String key,
                                                         byte[] content)
        Creates a new outgoing Kafka Message with a header added to the header list.
        Parameters:
        key - the header key
        content - the header key, must not be null
        Returns:
        the updated Kafka Message.
      • withHeader

        public OutgoingKafkaRecord<K,​T> withHeader​(String key,
                                                         String content)
        Creates a new outgoing Kafka Message with a header added to the header list.
        Parameters:
        key - the header key
        content - the header key, must not be null
        Returns:
        the updated Kafka Message.
      • withHeader

        public OutgoingKafkaRecord<K,​T> withHeader​(String key,
                                                         String content,
                                                         Charset enc)
        Creates a new outgoing Kafka Message with a header added to the header list.
        Parameters:
        key - the header key
        content - the header key, must not be null
        enc - the encoding, must not be null
        Returns:
        the updated Kafka Message.
      • withPayload

        public <P> OutgoingKafkaRecord<K,​P> withPayload​(P payload)
        Specified by:
        withPayload in interface org.eclipse.microprofile.reactive.messaging.Message<K>
      • withMetadata

        public OutgoingKafkaRecord<K,​T> withMetadata​(Iterable<Object> metadata)
        Specified by:
        withMetadata in interface org.eclipse.microprofile.reactive.messaging.Message<K>
      • withMetadata

        public OutgoingKafkaRecord<K,​T> withMetadata​(org.eclipse.microprofile.reactive.messaging.Metadata metadata)
        Specified by:
        withMetadata in interface org.eclipse.microprofile.reactive.messaging.Message<K>