Interface ConsumerRegistration

All Known Subinterfaces:
ProcessorRegistration

@Contract public interface ConsumerRegistration
Generated consumer registration contract.

The runtime always dispatches a MessageBatch. Generated registrations adapt that batch to the declared handler signature: payload and message handlers are invoked once per item, while a batch handler is invoked once per delivery.

  • Method Details

    • handlerId

      default String handlerId()
      Stable identity of this generated handler registration.
      Returns:
      handler identity
    • channel

      String channel()
      Channel name.
      Returns:
      channel name
    • declaredFailurePolicy

      default Optional<FailurePolicy> declaredFailurePolicy()
      Failure policy declared for this registration's incoming logical channel. The runtime reconciles declarations after applying explicit incoming-channel configuration.
      Returns:
      declared failure policy, if any
    • payloadGenericType

      GenericType<?> payloadGenericType()
      Expected payload type including generic arguments.
      Returns:
      generic payload type
    • envelopeGenericType

      GenericType<?> envelopeGenericType()
      Expected message envelope type including generic arguments.
      Returns:
      generic message envelope type
    • dispatch

      void dispatch(MessageBatch<?> batch)
      Dispatch one immutable delivery batch to the generated invocation adapter.
      Parameters:
      batch - delivery batch
      Throws:
      BatchDeliveryException - if delivery completes partially or its outcome is indeterminate
      RuntimeException - if the consumer fails