Module scheduler (2.27.1)

Schedulers provide means to schedule callbacks asynchronously.

These are used by the subscriber to call the user-provided callback to process each message.

Classes

Scheduler

Scheduler()

Abstract base class for schedulers.

Schedulers are used to schedule callbacks asynchronously.

ThreadScheduler

ThreadScheduler(
    executor: typing.Optional[concurrent.futures.thread.ThreadPoolExecutor] = None,
)

A thread pool-based scheduler. It must not be shared across SubscriberClients.

This scheduler is useful in typical I/O-bound message processing.

Parameter
Name Description
executor typing.Optional[concurrent.futures.thread.ThreadPoolExecutor]

An optional executor to use. If not specified, a default one will be created.