@Override public DeleteTopicResult deleteTopic(String topicArn) { return deleteTopic(new DeleteTopicRequest().withTopicArn(topicArn)); }
/** * <p> * Deletes a topic and all its subscriptions. Deleting a topic might prevent * some messages previously sent to the topic from being delivered to * subscribers. This action is idempotent, so deleting a topic that does not * exist does not result in an error. * </p> * * @param topicArn <p> * The ARN of the topic you want to delete. * </p> * @throws InvalidParameterException * @throws InternalErrorException * @throws AuthorizationErrorException * @throws NotFoundException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by Amazon * Simple Notification Service indicating either a problem with * the data in the request, or a server side issue. */ public void deleteTopic(String topicArn) throws AmazonServiceException, AmazonClientException { DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(); deleteTopicRequest.setTopicArn(topicArn); deleteTopic(deleteTopicRequest); }
try { logger.debug("destroy() " + this.snsTopicARN); snsClient.deleteTopic(this.snsTopicARN); } catch(Exception e) { logger.debug("destroy() error: " + e.getMessage());
/** * <p> * Deletes a topic and all its subscriptions. Deleting a topic might prevent * some messages previously sent to the topic from being delivered to * subscribers. This action is idempotent, so deleting a topic that does not * exist does not result in an error. * </p> * * @param topicArn <p> * The ARN of the topic you want to delete. * </p> * @throws InvalidParameterException * @throws InternalErrorException * @throws AuthorizationErrorException * @throws NotFoundException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by Amazon * Simple Notification Service indicating either a problem with * the data in the request, or a server side issue. */ public void deleteTopic(String topicArn) throws AmazonServiceException, AmazonClientException { DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(); deleteTopicRequest.setTopicArn(topicArn); deleteTopic(deleteTopicRequest); }
private void cleanUp(QueueConfig config) { snsClient.unsubscribe(new UnsubscribeRequest(config.snsSubscriptionARN)); snsClient.deleteTopic(new DeleteTopicRequest(config.snsTopicARN)); sqsClient.deleteQueue(new DeleteQueueRequest(config.sqsQueueURL)); }
/** * To be called when done with this object. Cleans up notifications for when * jobs complete. */ private void cleanUp() { snsClient.unsubscribe(new UnsubscribeRequest(snsSubscriptionARN)); snsClient.deleteTopic(new DeleteTopicRequest(snsTopicARN)); sqsClient.deleteQueue(new DeleteQueueRequest(sqsQueueURL)); }
sns.deleteTopic(deleteTopicRequest); logger.debug("event=delete_topic topic_arn="+arn+" user_id= " + userId); } catch (Exception ex) { sns.deleteTopic(deleteTopicRequest); logger.debug("event=delete_topic topic_arn=" + (t != null ? t.getTopicArn() : "null") + " user_id= " + userId); } catch (Exception ex) {