Interface MessagingRuntime


@Contract public interface MessagingRuntime
Internal synchronous runtime contract used by generated messaging emitters.

Every emission enters the runtime as a MessageBatch. A successful emission returns only after all required outputs complete. Outputs are invoked sequentially and the first failure is propagated to the caller. Already completed outputs are not rolled back, so a retry can duplicate delivery.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Declarative messaging graph run level, aligned with Helidon declarative RunLevels.MESSAGING.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> void
    emit(String channel, Message<T> message)
    Emit a message to a named channel.
    <T> void
    emitBatch(String channel, MessageBatch<? extends T> batch)
    Emit a batch of messages to a named channel.
  • Field Details

    • RUN_LEVEL

      static final double RUN_LEVEL
      Declarative messaging graph run level, aligned with Helidon declarative RunLevels.MESSAGING.
      See Also:
  • Method Details

    • emit

      default <T> void emit(String channel, Message<T> message)
      Emit a message to a named channel.

      A successful return means all required outputs completed. Handler and connector failures are propagated to the caller with their causes preserved.

      Type Parameters:
      T - payload type
      Parameters:
      channel - channel name
      message - message
      Throws:
      NullPointerException - if channel or message is null
      MessagingException - if the named channel does not exist
      RuntimeException - if a handler or outgoing connector fails
    • emitBatch

      <T> void emitBatch(String channel, MessageBatch<? extends T> batch)
      Emit a batch of messages to a named channel.

      A successful return means all required outputs completed. Handler and connector failures are propagated to the caller with their causes preserved. Completed outputs are not rolled back if a later output fails.

      Type Parameters:
      T - payload type
      Parameters:
      channel - channel name
      batch - immutable message batch
      Throws:
      NullPointerException - if channel or batch is null
      MessagingException - if the named channel does not exist
      BatchDeliveryException - if delivery completes partially or its outcome is indeterminate