public class PersistentStreamConnection extends Object
| Constructor and Description |
|---|
PersistentStreamConnection(String streamId,
Configuration configuration,
io.axoniq.axonserver.connector.event.PersistentStreamProperties persistentStreamProperties,
ScheduledExecutorService scheduler,
int batchSize)
Instantiates a connection for a persistent stream.
|
PersistentStreamConnection(String streamId,
Configuration configuration,
io.axoniq.axonserver.connector.event.PersistentStreamProperties persistentStreamProperties,
ScheduledExecutorService scheduler,
int batchSize,
String defaultContext)
Instantiates a connection for a persistent stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the persistent stream connection to Axon Server.
|
void |
open(Consumer<List<? extends EventMessage<?>>> consumer)
Initiates the connection to Axon Server to read events from the persistent stream.
|
public PersistentStreamConnection(String streamId, Configuration configuration, io.axoniq.axonserver.connector.event.PersistentStreamProperties persistentStreamProperties, ScheduledExecutorService scheduler, int batchSize)
streamId - The unique identifier of the persistent stream.configuration - Global configuration of Axon components.persistentStreamProperties - Properties for the persistent stream.scheduler - Scheduler thread pool to schedule tasks.batchSize - The batch size for collecting events.public PersistentStreamConnection(String streamId, Configuration configuration, io.axoniq.axonserver.connector.event.PersistentStreamProperties persistentStreamProperties, ScheduledExecutorService scheduler, int batchSize, String defaultContext)
streamId - The unique identifier of the persistent stream.configuration - Global configuration of Axon components.persistentStreamProperties - Properties for the persistent stream.scheduler - Scheduler thread pool to schedule tasks.batchSize - The batch size for collecting events.defaultContext - The default context to use for the connection.public void open(Consumer<List<? extends EventMessage<?>>> consumer)
IllegalStateException is thrown.consumer - The consumer of batches of event messages.IllegalStateException - if the stream was already opened.public void close()
Copyright © 2010–2025. All rights reserved.