use of com.netflix.metacat.common.dto.notifications.sns.messages.DeleteTableMessage in project metacat by Netflix.
the class SNSNotificationServiceImpl method notifyOfTableDeletion.
/**
* {@inheritDoc}
*/
@Override
@EventListener
public void notifyOfTableDeletion(@NonNull final MetacatDeleteTablePostEvent event) {
log.debug("Received DeleteTableEvent {}", event);
DeleteTableMessage message = null;
try {
message = new DeleteTableMessage(UUID.randomUUID().toString(), event.getRequestContext().getTimestamp(), event.getRequestContext().getId(), event.getName().toString(), event.getTable());
this.publishNotification(this.tableTopicArn, message);
this.registry.counter(this.registry.createId(Metrics.CounterSNSNotificationTableDelete.name()).withTags(Metrics.statusSuccessMap)).increment();
} catch (final Exception e) {
this.handleException(event.getName(), "Unable to publish delete table notification", Metrics.CounterSNSNotificationTableDelete.name(), message, e);
}
}
Aggregations