You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
how can we retry the execution of a command handler method in case of failure instead of triggering the compensation logic immediately?
public CommandHandlers commandHandlerDefinitions() {
return SagaCommandHandlersBuilder.fromChannel("CHANNEL_NAME")
.onMessage(Command.class, this::handleCommand)
.build();
}
public Message handleCommand(final CommandMessage<Command> command) {
try {
//logic
return withSuccess();
} catch (Exception e) {
// in case of failure, I want to retry the method instead of directly triggering the compensations action
return withFailure(SagaError.of(e));
}
The text was updated successfully, but these errors were encountered:
Hi,
how can we retry the execution of a command handler method in case of failure instead of triggering the compensation logic immediately?
The text was updated successfully, but these errors were encountered: