spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

SQS change message visibility

Open sharmmoh1983 opened this issue 6 years ago • 4 comments

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();
}

sharmmoh1983 avatar Mar 30 '19 10:03 sharmmoh1983

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.

jason2h avatar Feb 21 '20 04:02 jason2h

Hey @maciejwalkowiak. I would like to check it. Could you assign it to me?

isabek avatar Jun 07 '20 08:06 isabek

I'm not sure if this is needed since @SqsListener takes visibility parameter. Perhaps it's just a need to update documentation

maciejwalkowiak avatar Jun 07 '20 09:06 maciejwalkowiak

Ok, then. Thanks.

isabek avatar Jun 07 '20 09:06 isabek