Class DefaultInstructionAckSource<T>

java.lang.Object
org.axonframework.axonserver.connector.DefaultInstructionAckSource<T>
Type Parameters:
T - the type of message to be sent
All Implemented Interfaces:
InstructionAckSource<T>

public class DefaultInstructionAckSource<T> extends Object implements InstructionAckSource<T>
Default implementation of InstructionAckSource.
Since:
4.2.1
Author:
Milan Savic
  • Constructor Details

    • DefaultInstructionAckSource

      public DefaultInstructionAckSource(Function<io.axoniq.axonserver.grpc.InstructionAck,T> messageCreator)
      Parameters:
      messageCreator - creates a message based on InstructionAck
  • Method Details

    • sendAck

      public void sendAck(String instructionId, boolean success, io.axoniq.axonserver.grpc.ErrorMessage error, io.grpc.stub.StreamObserver<T> stream)
      Description copied from interface: InstructionAckSource
      Sends an acknowledgement.
      Specified by:
      sendAck in interface InstructionAckSource<T>
      Parameters:
      instructionId - identifier of successful instruction. If null, acknowledgement will not be sent.
      success - true if acknowledgement is successful, false otherwise
      error - the cause of the error. Provide null for successful acknowledgement
      stream - the stream for sending acknowledgements