Package org.nuxeo.runtime.pubsub
Interface PubSubProvider
- All Known Implementing Classes:
AbstractPubSubProvider,MemPubSubProvider,StreamPubSubProvider
public interface PubSubProvider
The SPI of a Publish/Subscribe implementation of the
PubSubService.- Since:
- 9.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Frees the resources.voidinitialize(Map<String, String> options, Map<String, List<BiConsumer<String, byte[]>>> subscribers) Initializes the resources for this provider and registers the local subscribers map.voidPublishes a message to the given topic.
-
Method Details
-
initialize
void initialize(Map<String, String> options, Map<String, List<BiConsumer<String, byte[]>>> subscribers) Initializes the resources for this provider and registers the local subscribers map.The options taken from the
PubSubProviderDescriptorThe subscribers map structure is thread-safe. The implementation must not modify the subscribers map in any way. -
close
void close()Frees the resources. -
publish
Publishes a message to the given topic.- Parameters:
topic- the topicmessage- the message
-