-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
SnsTemplate provides functionality to check for topic existence #1137
Comments
Hey @hardikSinghBehl , Interesting idea. I am up for it but I would suggest using getTopicAttribute call. Looking forward to your PR! :) |
9 tasks
sure @MatejNedic, I've raised a PR and used the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type: Feature
Is your feature request related to a problem? Please describe.
When using SNS, I usually configure the SNS ARN using
@ConfigurationProperties
and pass it when using theSnsTemplate
class. If an incorrect ARN is configured, the exception is thrown at runtime when the library tries to publish a message. To allow validation of SNS topic existence to be performed at application startup using ConstraintValidator, It would be great if a methodboolean topicExists(String topicArn)
is available inSnsTemplate
class. This would be similar to the methodboolean bucketExists(String bucketName)
present inS3Template
class.Describe the solution you'd like
addition of method
boolean topicExists(String topicArn)
in SnsTemplate. This can be achieved using the read only actionsns:ListTopics
. Something like belowDescribe alternatives you've considered
Used the above solution in my application, but it'll be great if there was a concise way of doing this similar to
S3Template
Additional context
Can submit PR if the feature is approved
The text was updated successfully, but these errors were encountered: