public final class TopicProducer
extends Object
Topic calls on services, a service that returns these topics will
automatically have these streams published while the service is running, sharded across the services nodes.| Constructor and Description |
|---|
TopicProducer() |
| Modifier and Type | Method and Description |
|---|---|
static <Message> Topic<Message> |
singleStreamWithOffset(java.util.function.Function<Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
Publish a single stream.
|
static <Message,Event extends AggregateEvent<Event>> |
taggedStreamWithOffset(org.pcollections.PSequence<AggregateEventTag<Event>> tags,
java.util.function.BiFunction<AggregateEventTag<Event>,Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
Publish a stream that is sharded across many tags.
|
public static <Message> Topic<Message> singleStreamWithOffset(java.util.function.Function<Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
eventStream - A function to create the event stream given the last offset that was published.public static <Message,Event extends AggregateEvent<Event>> Topic<Message> taggedStreamWithOffset(org.pcollections.PSequence<AggregateEventTag<Event>> tags, java.util.function.BiFunction<AggregateEventTag<Event>,Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
tags - The tags to publish.eventStream - A function event stream for a given shard given the last offset that was published.