Interface ConsumerRegistration
- All Known Subinterfaces:
ProcessorRegistration
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 Summary
Modifier and TypeMethodDescriptionchannel()Channel name.default Optional<FailurePolicy> Failure policy declared for this registration's incoming logical channel.voiddispatch(MessageBatch<?> batch) Dispatch one immutable delivery batch to the generated invocation adapter.GenericType<?> Expected message envelope type including generic arguments.default StringStable identity of this generated handler registration.GenericType<?> Expected payload type including generic arguments.
-
Method Details
-
handlerId
Stable identity of this generated handler registration.- Returns:
- handler identity
-
channel
-
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
Dispatch one immutable delivery batch to the generated invocation adapter.- Parameters:
batch- delivery batch- Throws:
BatchDeliveryException- if delivery completes partially or its outcome is indeterminateRuntimeException- if the consumer fails
-