1
我試圖啓動一個寫入SQS隊列的spring-int-aws流,但上下文不會加載。Amazon SQS出站通道適配器將不會初始化
Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
2016-10-03 14:10:51.848 ERROR 3741 --- [ main]
o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.integration.aws.outbound.SqsMessageHandler#0':
Bean instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.integration.aws.outbound.SqsMessageHandler]: Constructor
threw exception; nested exception is java.lang.NoSuchMethodError:
org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate.<init
(Lcom/amazonaws/services/sqs/AmazonSQS;Lorg/springframework/cloud/aws/core/env/ResourceIdResolver;)V
....
做了一些研究:在SQSMessageHandler的內部(V 1.0.0-RELEASE),它試圖用一個聲明AmazonSQS對象來創建一個QueueMessagingTemplate,但是QueueMessagingTemplate(V1.1.3版)它需要在AmazonSQSAsync對象構造函數。由於spring-cloud-aws使用子接口,因此spring-int-aws似乎也應該如此。
我是否錯過了一些東西,或者應該是針對該項目提出的問題?
我開了問題。 –
謝謝你,@GaryRussell我會在spring-int-aws方面發佈一個PR。根據sprint-cloud-aws的變化,我們做出了改變,使超時實際上作爲發送超時而不是SQS消息延遲,因此在某些時候我們可能希望使用Async接口,如入站適配器。 – MikeG