Hi Amol
Just wanted to leave some feedback on your AWS library. It's very handy and easy to add into our configuration, but ultimately we were unable to use it for a number of reasons.
- For various reasons, we cannot upgrade to Spring 3.1, but for some reason, your SQS adapter uses a ConversionService implementation only available in 3.1. I don't know why your SQS adapter needs to handle any conversion at all. Isn't that the job of Message Transformers?
- While the XML configuration offered by your XSD makes dropping in the functionality very simple, it does not allow for overriding various components. It would be great if I could just point it to a reference of my sqsClient, which might be a slightly different implementation rather than the default (add encryption, etc.). Also, you use a default Json message transformer, but don't have the configuration in place to use a different message transformer, or even customize the configuration of the Json transformer. We have some Jackson modules that are necessary to serialize/deserialize our data, but we can't add that in with the XSD configuration.
- I'm not sure why you need to use your own interface to describe the AwsCredentials. AwsCredentials is already an interface for which there are multiple implementations. We have one that retrieves our credentials from a secure store, but can't use it with your library because it doesn't implement your interface.
Ultimately, I think your components need to focus on doing fewer things. Ideally, the SQS adapters should just focus on dealing with the SQS data and delegating to any configurable transformers to manage serializing/deserializing the data. Some configuration like the following would be a great improvement:
Code:
<!-- only one of credentialsRef or sqsClient is necessary -->
<aws-sqs:inbound-channel-adapter
credentialsRef="myCredentialsImpl"
sqsClient="myClientImpl"
channel="inboundChannel"
sqs-queue="https://queue.amazonaws.com/myworkqueue"
transactional="false"
max-redelivery-attempts="3">
<int:poller fixed-rate="500" receive-timeout="3000" />
<!-- optional transformer or transformation could be handled in the delegate channel chain -->
<int:json-to-object-transformer type="com.foo.MyDataClass" object-mapper="objectMapper"/>
</aws-sqs:inbound-channel-adapter>
Please keep working on the library, as I think it would be a great extension to SpringIntegration. The transaction support is nice and the option to use SES is also really cool. SNS would be a nice addition to round out the AWS messaging services available.
Thanks,
Mike