createConcurrentSink
Creates an update sink that handles updates concurrently. In other words, new updates will be fetched—and their processing will be started—before the processing of older updates completes. The maximal number of concurrently handled updates can be limited (default: 500).
In the context of grammY, this is the sink that is created by default when calling run(bot)
.
Type Parameters
Y
ts
Y
R
ts
R = unknown
Parameters
handler
ts
handler: UpdateConsumer<Y>
Update consumer
errorHandler
Error handler for when the update consumer rejects
options
ts
options: SinkOptions<Y>
Further options for creating the sink
Return Type
ts
UpdateSink<Y>
An update sink that handles updates concurrently