-
Notifications
You must be signed in to change notification settings - Fork 14
Upgrade to AWS SDK v2 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
String errorMessage = "SNS extended client does not support sending JSON messages."; | ||
LOGGER.error(errorMessage); | ||
throw new AmazonClientException(errorMessage); | ||
} | ||
|
||
publishRequest.getRequestClientOptions().appendUserAgent(USER_AGENT_HEADER); | ||
PublishRequest.Builder publishRequestBuilder = publishRequest.toBuilder(); | ||
publishRequestBuilder.overrideConfiguration(AwsRequestOverrideConfiguration.builder().putHeader(USER_AGENT_HEADER_NAME, USER_AGENT_HEADER).build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if there was a better way to handle this. Please advise here
I am unable to specify reviewers. so tagging @aws-ivvladim @aws-rizi |
src/main/java/software/amazon/sns/AmazonSNSExtendedClientBase.java
Outdated
Show resolved
Hide resolved
Thanks for the review @aws-rizi. I updated the comments per your request |
@@ -1,6 +1,8 @@ | |||
package software.amazon.sns; | |||
|
|||
import software.amazon.awssdk.core.exception.SdkClientException; | |||
import java.util.function.Consumer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We have following methods in that are not implemented in this class, so if somebody calls them on instance of
1) default ListEndpointsByPlatformApplicationIterable listEndpointsByPlatformApplicationPaginator(
ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest)
2) default ListPlatformApplicationsIterable listPlatformApplicationsPaginator(
ListPlatformApplicationsRequest listPlatformApplicationsRequest)
3) default ListSubscriptionsIterable listSubscriptionsPaginator(ListSubscriptionsRequest listSubscriptionsRequest)
4) default ListSubscriptionsByTopicIterable listSubscriptionsByTopicPaginator(
ListSubscriptionsByTopicRequest listSubscriptionsByTopicRequest)
5) default ListTopicsIterable listTopicsPaginator(ListTopicsRequest listTopicsRequest)
could you please override these methods as well here?
- Please add exceptions to the methods to be consistent with DefaultSnsClient.java in software.amazon.awssdk.services.sns. (In both AmazonSNSExtendedClientBase.java and AmazonSNSExtendedClient.java)
as sample:
@Override
public AddPermissionResponse addPermission(AddPermissionRequest addPermissionRequest) throws InvalidParameterException,
InternalErrorException, AuthorizationErrorException, NotFoundException, AwsServiceException, SdkClientException,
SnsException {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
src/main/java/software/amazon/sns/AmazonSNSExtendedClientBase.java
Outdated
Show resolved
Hide resolved
src/test/java/software/amazon/sns/AmazonSNSExtendedClientTest.java
Outdated
Show resolved
Hide resolved
Hey any updates on this? Support for SDK V2 would be awesome! I am willing to contribute. What needs to be done here that's still remaining? How do we move this forward? |
Now that awslabs/amazon-sqs-java-extended-client-lib#58 has been merged can we get the dependency updated in this PR and get it merged in? |
Issue #, if available:
#7
Description of changes:
Ensure this library is compatible with Java SDK V2
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.