V
- the type of the value on the topicU
- the type of the value returned to the subscriberpublic static interface Subscriber.Option<V,U>
Subscriber.Option
for a Subscriber
.
Subscriber Option | Description |
Subscriber.Name.of(String) |
Specify subscriber group name.
For each value delivered to a subscriber group, only one member of the group receives the value. |
Subscriber.Filtered.by(Filter) |
Only Subscriber.receive() values matching this Filter.
Only one Filter per subscription group. |
Subscriber.Convert.using(Function) |
Convert topic value using provided Function (or Remote.Function ) prior to Subscriber.receive() .
Only one Converter per subscription group. |
Subscriber.CompleteOnEmpty.enabled() |
When no values left to Subscriber.receive() , returned CompletableFuture.get() returns null Element.
By default, returned CompletableFuture.get() blocks until next topic value is available to return. |
All members of subscriber group share at most a single Filter
and single Converter
. The last
Subscriber
joining the group and specifying these option(s) are the ones used by all subscriber group members.
Note that when both a Subscriber.Filtered.by(Filter)
and Subscriber.Convert.using(Function)
are specified, the Filter
is
applied first and only NamedTopic
values matching the filter are converted before being
received by the Subscriber(s)
.