Kelvin.InOrderSubscription (Kelvin v0.2.1) View Source
A subscription producer which processes events in order as they appear in the EventStoreDB
Options
:name
- (optional) the GenServer name for this producer:stream_name
- (required) the stream name to which to subscribe:connection
- (required) the Extreme client module to use as a connection to the EventStoreDB. This may either be the name of the Extreme client module or its pid.:restore_stream_position!
- (required) a function which determines the stream position from which this listener should begin after initializing or restarting. Values may be either an MFA tuple or a 0-arity anonymous function.:subscribe_on_init?
- (required) a function which determines whether the producer should subscribe immediately after starting up. Values may be either an MFA tuple or a 0-arity anonymous function. The function should return eithertrue
to subscribe immediately on initialization orfalse
if the author intends on manually subscribing the producer. This producer can be manually subscribed bysend/2
ing a message of:subscribe
to the process.:catch_up_chunk_size
- (default:256
) the number of events to query for each read chunk while catching up. This option presents a trade-off between network queries and query duration over the network.