Constructor and Description |
---|
TopicProducer() |
Modifier and Type | Method and Description |
---|---|
static <Message> Topic<Message> |
singleStreamWithOffset(Function<Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
Publish a single stream.
|
static <Message,Event extends AggregateEvent<Event>> |
taggedStreamWithOffset(AggregateEventShards<Event> shards,
BiFunction<AggregateEventTag<Event>,Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
Publish all tags of a stream that is sharded across many tags.
|
static <Message,Event extends AggregateEvent<Event>> |
taggedStreamWithOffset(org.pcollections.PSequence<AggregateEventTag<Event>> tags,
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(Function<Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
This producer will ensure every element from the stream will be published at least once (usually only once), using the message offsets to track where in the stream the producer is up to publishing.
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, BiFunction<AggregateEventTag<Event>,Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
The tags will be distributed around the cluster, ensuring that at most one event stream for each tag is being published at a particular time.
This producer will ensure every element from each tags stream will be published at least once (usually only once), using the message offsets to track where in the stream the producer is up to publishing.
tags
- The tags to publish.eventStream
- A function event stream for a given shard given the last offset that was
published.public static <Message,Event extends AggregateEvent<Event>> Topic<Message> taggedStreamWithOffset(AggregateEventShards<Event> shards, BiFunction<AggregateEventTag<Event>,Offset,akka.stream.javadsl.Source<akka.japi.Pair<Message,Offset>,?>> eventStream)
The tags will be distributed around the cluster, ensuring that at most one event stream for each tag is being published at a particular time.
This producer will ensure every element from each tags stream will be published at least once (usually only once), using the message offsets to track where in the stream the producer is up to publishing.
shards
- The tags to publish.eventStream
- A function event stream for a given shard given the last offset that was
published.