spring-cloud-aws
spring-cloud-aws copied to clipboard
SQS change message visibility
I want to change message visibility
sqsClient.ChangeMessageVisibility(myEndpoint, myMessage.getReceiptHandle(), 60);
How to achieve this using @SqsListener
@SqsListener(value ="TEST",deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS)
public void getMessage(@Headers Map<String, String> headers,String message) throws Exception {
LOG.info("Message from SQS Queue - {} ",message);
throw new Exception();
}
Try to add another argument of org.springframework.cloud.aws.messaging.listener.Visibility in the listener method, then you can extend visibility timeout of the message.
Hey @maciejwalkowiak. I would like to check it. Could you assign it to me?
I'm not sure if this is needed since @SqsListener takes visibility parameter. Perhaps it's just a need to update documentation
Ok, then. Thanks.