for (CartridgeSubscription cartridgeSubscription : cartridgeSubscriptions) {
// We need to send this event for all types, single tenant and multi tenant.
// In an autoscaling scenario, we need to send this event for all existing subscriptions for the newly spawned instance
// Also in a case of restarting the agent, this event needs to be sent for all subscriptions for the existing instance
if (cartridgeSubscription.getRepository() != null) {
InstanceNotificationPublisher publisher = new InstanceNotificationPublisher();
publisher.sendArtifactUpdateEvent(cartridgeSubscription.getRepository(), clusterId,
String.valueOf(cartridgeSubscription.getSubscriber().getTenantId()));
} else {
if(log.isDebugEnabled()) {
log.debug("No repository found for subscription with alias: " + cartridgeSubscription.getAlias() + ", type: " + cartridgeSubscription.getType()+