- ListeningExecutorService listeningExecutor = SingletonHolder.getDefaultNotificationExecutor();
- NotificationBrokerImpl broker = new NotificationBrokerImpl(listeningExecutor);
- return broker;
+
+ final NotificationPublishService notificationPublishService = getNotificationPublishAdapterDependency();
+ final NotificationService notificationService = getNotificationAdapterDependency();
+
+ if(notificationPublishService != null & notificationService != null) {
+ return new HeliumNotificationProviderServiceAdapter(notificationPublishService, notificationService);
+ }
+
+ /*
+ * FIXME: Switch to new broker (which has different threading model)
+ * once this change is communicated with downstream users or
+ * we will have adapter implementation which will honor Helium
+ * threading model for notifications.
+ */
+
+ return new NotificationBrokerImpl(SingletonHolder.getDefaultNotificationExecutor());