... | ... | @@ -160,6 +160,7 @@ Another useful communication pattern is the publish/subscribe pattern. It allows |
|
|
```java
|
|
|
try {
|
|
|
// Create the publisher with name "the-publisher".
|
|
|
// Set the number of subscribers to 1.
|
|
|
Publisher publisher = Publisher.create("the-publisher", 1);
|
|
|
|
|
|
// Synchronize with subscribers.
|
... | ... | |