Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Spring cloud SqsListener读取消息失败尝试之间的阈值_Java_Spring Boot_Listener_Spring Cloud_Amazon Sqs - Fatal编程技术网

Java 使用Spring cloud SqsListener读取消息失败尝试之间的阈值

Java 使用Spring cloud SqsListener读取消息失败尝试之间的阈值,java,spring-boot,listener,spring-cloud,amazon-sqs,Java,Spring Boot,Listener,Spring Cloud,Amazon Sqs,在我的Spring Boot 2应用程序中有一个SqsListener: @SqsListener(value=“${sqs.message.queue}”,deletionPolicy=ON_SUCCESS) public void myMessageListener(MyMessage MyMessage)引发MyMessageServiceException{ myMessageService.processMessage(myMessage); } MyMessageService#p

在我的Spring Boot 2应用程序中有一个
SqsListener

@SqsListener(value=“${sqs.message.queue}”,deletionPolicy=ON_SUCCESS)
public void myMessageListener(MyMessage MyMessage)引发MyMessageServiceException{
myMessageService.processMessage(myMessage);
}
MyMessageService#processMessage
在某些情况下抛出异常。执行此操作时,消息返回到SQS,由
deletionPolicy
命令,供上述侦听器再次读取

我希望在处理消息的失败尝试之间有某种阈值(比如600秒)

是否有现成的解决方案来设置此类阈值而不创建一些断路器逻辑?

我提出的唯一“无代码”解决方案是在Amazon SQS管理控制台的SQS队列设置中更改
默认可见性超时
属性