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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisMarkedForAbort()Is the current transaction marked for abort.voidmarkForAbort()Mark the current transaction for abort.<M extends org.eclipse.microprofile.reactive.messaging.Message<? extends T>>
voidsend(M msg)Sends a message to the Kafka channel.voidsend(T payload)Sends a payload to the channel.
-
-
-
Method Detail
-
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 benull- Throws:
IllegalStateException- if the channel has been cancelled or terminated or if an overflow strategy ofTHROW_EXCEPTIONorBUFFERis 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
Messageobject will be created to hold the payload.- Parameters:
payload- the thing to send, must not benull.- See Also:
MutinyEmitter.send(Object)
-
markForAbort
void markForAbort()
Mark the current transaction for abort.
-
isMarkedForAbort
boolean isMarkedForAbort()
Is the current transaction marked for abort.
-
-