sendAll

@Suspendable
abstract fun sendAll(@NotNull payload: Any, @NotNull sessions: Set<FlowSession>)

Queues the given payload for sending to the provided sessions and continues without waiting for a response.

Note that the other parties may receive the message at some arbitrary later point or not at all: if one of the provided [sessions] is offline then message delivery will be retried until the session expires. Sessions are deemed to be expired when this session stops receiving heartbeat messages from the counterparty within the configurable timeout.

The payload object should be of a type that is annotated with @CordaSerializable or a primitive type. This function cannot handle types that do not meet these criteria.

Parameters

payload

the payload to send, which should be either a primitive type or a type annotated with @CordaSerializable.

sessions

the sessions to send the provided payload to.

Throws

CordaRuntimeException

if any session is closed or in a failed state.