Interface NotificationPublisher
- All Known Implementing Classes:
KafkaNotificationPublisher
,RabbitMQNotificationPublisher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A publisher of notifications.
An implementation of this interface normally uses a messaging system to publish messages containing information about the notifications.
In this case, the publicationChannel that is used by the publish(List, String)
method would correspond to an exchange
name.
- Author:
- RealLifeDeveloper
-
Method Summary
Modifier and TypeMethodDescriptionvoid
publish
(List<Notification> notifications, String publicationChannel) Publishes a number of notifications to the given publication channel.
-
Method Details
-
publish
Publishes a number of notifications to the given publication channel.- Parameters:
notifications
- a list ofNotifications
to publishpublicationChannel
- the name of the publication channel- Throws:
IOException
- if publishing failed
-