use of com.netflix.metacat.common.dto.notifications.sns.messages.CreateTableMessage in project metacat by Netflix.
the class SNSNotificationServiceImpl method notifyOfTableCreation.
/**
* {@inheritDoc}
*/
@Override
@EventListener
public void notifyOfTableCreation(@NonNull final MetacatCreateTablePostEvent event) {
log.debug("Received CreateTableEvent {}", event);
CreateTableMessage message = null;
try {
message = new CreateTableMessage(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.CounterSNSNotificationTableCreate.name()).withTags(Metrics.statusSuccessMap)).increment();
} catch (final Exception e) {
this.handleException(event.getName(), "Unable to publish create table notification", Metrics.CounterSNSNotificationTableCreate.name(), message, e);
}
}
Aggregations