Persistent Streams

Persistent streams are created in Axon Server when an Axon Framework application defines an event processor to use persistent streams, or when an event handler is defined in the integrations section.

Axon Server provides options to change the number of segments for a persistent stream and to reset a stream to a specific position. Increasing the number of segments allows more events to be processed in parallel. When you reset the position of the persistent stream to an earlier position, older events are sent again with a replay indicator.

Axon Server has the following global configuration properties for persistent streams:

axoniq.axonserver.streams.buffer-progress

Set this to true to reduce the number of database updates registering the last confirmed position of a persistent stream segment. This may lead to the last events being sent multiple times on an unclean shutdown of Axon Server.

axoniq.axonserver.streams.buffer-time-millis

The time to buffer progress updates if buffer-progress is set. Default value is 1000 milliseconds.

axoniq.axonserver.streams.thread-count

Number of threads available to send events over persistent streams. Default value is 4.

axoniq.axonserver.streams.segment-close-seconds

Time to wait for pending progress messages when closing a persistent stream segment. This prevents duplicating event messages when segments are closed due to changing the number of segments or moving segments to other Axon Server nodes. Default value is 15 seconds.