public static class DeadLetteringEventHandlerInvoker.Builder extends SimpleEventHandlerInvoker.Builder<DeadLetteringEventHandlerInvoker.Builder>
DeadLetteringEventHandlerInvoker
.
The EnqueuePolicy
defaults to returning Decisions.enqueue(Throwable)
when invoked, the
ListenerInvocationErrorHandler
is defaulted to a PropagatingErrorHandler
, the
SequencingPolicy
to a SequentialPerAggregatePolicy
, and allowReset
defaults to
false
. Providing at least one Event Handler, a SequencedDeadLetterQueue
, and a
TransactionManager
are hard requirements and as such should be provided.
eventHandlers, eventHandlers, handlerDefinition, listenerInvocationErrorHandler, parameterResolverFactory, sequencingPolicy, wrapEventMessageHandler
public DeadLetteringEventHandlerInvoker.Builder queue(@Nonnull SequencedDeadLetterQueue<EventMessage<?>> queue)
SequencedDeadLetterQueue
this EventHandlerInvoker
maintains dead letters with.queue
- The SequencedDeadLetterQueue
this EventHandlerInvoker
maintains dead letters
with.public DeadLetteringEventHandlerInvoker.Builder enqueuePolicy(EnqueuePolicy<EventMessage<?>> enqueuePolicy)
EnqueuePolicy
this EventHandlerInvoker
uses to decide whether a
dead letter
should be added to the SequencedDeadLetterQueue
. Defaults to returning
Decisions.enqueue(Throwable)
when invoked for any dead letter.enqueuePolicy
- The EnqueuePolicy
this EventHandlerInvoker
uses to decide whether a
dead letter
should be added to the SequencedDeadLetterQueue
.public DeadLetteringEventHandlerInvoker.Builder transactionManager(@Nonnull TransactionManager transactionManager)
TransactionManager
used by this invoker for all operations involving the configured
SequencedDeadLetterQueue
.transactionManager
- The TransactionManager
used by this invoker for all operations
involving the configured SequencedDeadLetterQueue
public DeadLetteringEventHandlerInvoker.Builder allowReset(boolean allowReset)
DeadLetteringEventHandlerInvoker
supports resets of the provided
SequencedDeadLetterQueue
. If set to true
, SequencedDeadLetterQueue.clear()
will be
invoked upon a SimpleEventHandlerInvoker.performReset()
/SimpleEventHandlerInvoker.performReset(Object)
invocation. Defaults to false
.allowReset
- A toggle dictating whether this DeadLetteringEventHandlerInvoker
supports resets of
the provided SequencedDeadLetterQueue
.public DeadLetteringEventHandlerInvoker build()
DeadLetteringEventHandlerInvoker
as specified through this Builder.build
in class SimpleEventHandlerInvoker.Builder<DeadLetteringEventHandlerInvoker.Builder>
DeadLetteringEventHandlerInvoker
as specified through this Builder.protected void validate()
validate
in class SimpleEventHandlerInvoker.Builder<DeadLetteringEventHandlerInvoker.Builder>
AxonConfigurationException
- When one field asserts to be incorrect according to the Builder's
specifications.Copyright © 2010–2023. All rights reserved.