Last active
August 29, 2015 14:25
-
-
Save bitsmuggler/976fa50e682dbee3f65c to your computer and use it in GitHub Desktop.
Create an aws topic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String createTopic(String topicName) { | |
try { | |
LOGGER.info("Create SNS Topic " + topicName); | |
CreateTopicRequest request = new CreateTopicRequest(topicName); | |
CreateTopicResult result = sns.createTopic(request); | |
// returning topic id | |
return result.getTopicArn(); | |
} catch (Exception ex) { | |
LOGGER.error("Error at creating sns topic.", ex); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment