我正在努力实现以下链接想要实现的目标。
使用 Spring JmsListener 的扩展客户端库的 Amazon SQS 异步侦听器
我无法使用下面的示例找到 AmazonS3Client 和 AmazonSQSAsync 类。有人到这一步了吗
@Bean
public ConnectionFactory connectionFactory(final AmazonS3Client amazonS3Client, final AmazonSQSAsync amazonSqs) {
final ExtendedClientConfiguration extendedClientConfig = new ExtendedClientConfiguration()
.withLargePayloadSupportEnabled(amazonS3Client, "my-bucket-name");
final ProviderConfiguration providerConfiguration = new ProviderConfiguration();
providerConfiguration.setNumberOfMessagesToPrefetch(10);
final SQSConnectionFactory sqsConnectionFactory = new SQSConnectionFactory(providerConfiguration,
new AmazonSQSExtendedClient(amazonSqs, extendedClientConfig));
return sqsConnectionFactory
}
有人可以帮忙回答一下这个问题吗?有人遇到过类似的事情吗? 感谢帮助!
您所需的大部分依赖项是:
<properties>
<aws-java-sdk.version>1.11.300</aws-java-sdk.version>
<amazon-sqs-java-messaging-lib.version>2.1.1</amazon-sqs-java-messaging-lib.version>
</properties>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sqs</artifactId>
<version>${aws-java-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${aws-java-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>amazon-sqs-java-messaging-lib</artifactId>
<version>${amazon-sqs-java-messaging-lib.version}</version>
</dependency>