79109761

Date: 2024-10-21 11:16:19
Score: 1.5
Natty:
Report link

To perform manual acknowledgment, we use the static method Acknowledgement.acknowledge()

@SqsListener("HowToDoInJava")
public void listen(Message<?> message) {

    LOGGER.info("Message received on the listen method at {}", OffsetDateTime.now());
    Acknowledgement.acknowledge(message);
}

https://howtodoinjava.com/spring-cloud/aws-sqs-with-spring-cloud-aws/

To acknowledge messages received with MANUAL acknowledgement, the Acknowledgement#acknowledge and Acknowledgement#acknowledgeAsync methods can be used.

https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-SNAPSHOT/reference/html/index.html#sqs-template-acknowledgement

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Maksim Radzevich