BotConfig.coordination: run this bot as one of N replicas. Omit it for a single
process (the default; nothing below runs).
Properties
coordinator
RedisCoordinator, or MemoryCoordinator for one process).
turnWaitMs?
'2m') or ms. When it
runs out the message is dropped and reported as a CoordinationUnavailableError
('timeout'). Default '2m'.
settleMs?
c.ask, a c.goto() target) to reach its next
wait or end, so no other replica processes the chat meanwhile. A step still running
then (a slow .do(), a long c.sleep or delay) is stopped, keeping its checkpoint,
before the turn is released: a persistent flow re-runs that step on the chat’s next
message. Set it above your longest step. Default '1m'.
providerDownMs?
providerSession: 'leader': how long the leader’s transport may stay
'closed' (logged out, session taken over, reconnect given up) before the replica
steps down so a standby connects instead. Default '1m'.
providerSession?
'leader'— only the replica holding theprovider:<id>leadership starts the provider; the others stand by and take over when it is lost;'shared'— every replica starts it (webhook transports, each replica receives part of the traffic);'auto'(default) —'leader'whenprovider.capabilities.exclusiveSession, else'shared'.
handover?
{ flows: 'drop', fallback: 'drop' }: only .persistent() flows continue there.