Aws-sdk-java: 1.11 is not backwards compatible with 1.10 because of SetQueueAttributesResult

Created on 29 Jun 2016  路  5Comments  路  Source: aws/aws-sdk-java

1.11 introduced a new class calls SetQueueAttributesResult and changed the signature of AmazonSQS#setQueueAttributes to an instance of this class. That means that no code that was compiled with 1.10 can be used with code that is compiled with 1.11. So any libraries that used SQS 1.10 cannot be used by a 1.11 project.

The really ugly thing is that this is essentially a null class. I mean this has to be a bug. Why break code just to return an instance of a class that can never provide any data? This method should be changed back to return void. This was a pretty sloppy change. Otherwise you should use semver and change from 1.10.X to 2.X for this change.

Most helpful comment

Is that somewhere in the documentation? We only found the issue after messing around with dependencies for two days (we use other libraries that also use the AWS SDK). Googling around brought up no such information on 1.11 not being backwards compatible with 1.10. Would appreciate a link. I suggest you put it somewhere more prominent as it would save others from getting bitter after trying to make things work.

All 5 comments

Robert, our versioning scheme treats 1.10 and 1.11 as separate major versions so they aren't intended to be compatible with one another. We made this change to prevent binary incompatible changes in the future. If a service starts defining an output for an API action (which is not a breaking change for them) then it would break binary compatibility in the Java SDK. To prevent this in the future we decided to take the hit once and generate empty POJOs for all operations that do not define an output.

Is that somewhere in the documentation? We only found the issue after messing around with dependencies for two days (we use other libraries that also use the AWS SDK). Googling around brought up no such information on 1.11 not being backwards compatible with 1.10. Would appreciate a link. I suggest you put it somewhere more prominent as it would save others from getting bitter after trying to make things work.

Since you broke all 1.10 based libraries, are you going to add new regions into 1.10.X? Oh, and update Embedded Dynamo, KPL, and KCL?

We mentioned the change in https://aws.amazon.com/releasenotes/Java/9979983567247718 but it's a bit abstract and doesn't call out SQS specifically.

You can actually use new regions without updating.
client.setRegion(RegionUtils.getRegion("ap-south-1"));

KCL now supports 1.11.

Was this page helpful?
0 / 5 - 0 ratings