Defaults and timeouts

Every option has a default, chosen for pipelines with cheap events. The table lists them all; the section below explains what happens when a subscription runs out of time.

Defaults

OptionWhereDefault
max_demandper subscription1000
min_demandper subscription750
cancel_modeper subscriptionPermanent
subscribe_timeoutper subscription5000 ms
buffer_capacitysource builder10,000
buffer_capacitygate builderno limit
buffer_keepsource and gateKeepLast
start_timeoutstage builders5000 ms
on_discardsource and gatelog warning
child restartconsumer supervisorTemporary
restart toleranceconsumer supervisor3 in 5 s
shutdown_timeoutconsumer supervisor5000 ms

Subscription timeouts

subscribe waits for the consumer stage for up to subscribe_timeout. If time runs out, it returns Error(SubscribeTimeout) and withdraws the request. The request can’t become a live subscription later: sluice does not send its subscription or initial demand to the producer, and does not call the consumer’s on_subscribed or on_cancelled callbacks for it. It’s safe to retry the subscription.

A successful subscribe means the consumer sent the subscription to the producer. The producer’s acceptance is still asynchronous — for example, a dispatcher’s refusal arrives later as an abnormal end of the subscription.

Search Document