handleCommandWithDeciderAndRetry
API reference for handleCommandWithDeciderAndRetry
Function: handleCommandWithDeciderAndRetry()
Section titled “Function: handleCommandWithDeciderAndRetry()”handleCommandWithDeciderAndRetry<
State
,TCommand
,TEvent
>(eventStore
,streamId
,command
,decider
,options?
):Promise
<CommandHandlerResult
<State
,TEvent
>>
Handle command with Decider and automatic retry on version conflicts
Type Parameters
Section titled “Type Parameters”State
TCommand
Section titled “TCommand”TCommand
extends Command
TEvent
Section titled “TEvent”TEvent
extends Readonly
<{ data
: EventData
; metadata?
: PlatformEventMetadata
; type
: string
; }> = Readonly
<{ data
: EventData
; metadata?
: PlatformEventMetadata
; type
: string
; }>
Parameters
Section titled “Parameters”eventStore
Section titled “eventStore”streamId
Section titled “streamId”string
command
Section titled “command”TCommand
decider
Section titled “decider”Decider
<State
, TCommand
, TEvent
>
options?
Section titled “options?”Returns
Section titled “Returns”Promise
<CommandHandlerResult
<State
, TEvent
>>