Interface TransactionalEmitter<T>

Type Parameters:
T - payload type

public interface TransactionalEmitter<T>
Emitter for sending messages to a Kafka channel in a transaction. Send methods immediately return by calling the underlying Emitter.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is the current transaction marked for abort.
    void
    Mark the current transaction for abort.
    <M extends org.eclipse.microprofile.reactive.messaging.Message<? extends T>>
    void
    send(M msg)
    Sends a message to the Kafka channel.
    void
    send(T payload)
    Sends a payload to the channel.
  • Method Details

    • send

      <M extends org.eclipse.microprofile.reactive.messaging.Message<? extends T>> void send(M msg)
      Sends a message to the Kafka channel.

      Immediately returns without waiting for the result by dispatching the message to the underlying Emitter.

      Type Parameters:
      M - the Message type
      Parameters:
      msg - the Message to send, must not be null
      Throws:
      IllegalStateException - if the channel has been cancelled or terminated or if an overflow strategy of THROW_EXCEPTION or BUFFER is configured and the emitter overflows.
      See Also:
      • MutinyEmitter.send(Message)
    • send

      void send(T payload)
      Sends a payload to the channel.

      Immediately returns without waiting for the result by dispatching the message to the underlying Emitter.

      A Message object will be created to hold the payload.

      Parameters:
      payload - the thing to send, must not be null.
      See Also:
      • MutinyEmitter.send(Object)
    • markForAbort

      void markForAbort()
      Mark the current transaction for abort.
    • isMarkedForAbort

      boolean isMarkedForAbort()
      Is the current transaction marked for abort.