Skip to content

Queues

The queue sits between the producer (extraction) and the consumer (loading) in the thread and process runners. The stream runner doesn’t use one.

Queues provide a buffer between extraction and loading:

  • Decoupling: Sources and destinations work independently
  • Throughput: Extraction continues while the destination loads the previous batch
  • Backpressure: The producer pauses when the queue is full

python_queue is the default and the only supported queue. It needs no external service.

engine:
queue:
type: python_queue
config:
max_nb_messages: 1000000
max_bytes: 536870912
queue:
max_size: 0
consumer:
poll_interval: 1
FieldDefaultDescription
config.max_nb_messages1000000Maximum number of messages in the queue
config.max_bytesunsetPause the producer once the queued iterations take about this many bytes in memory
config.queue.max_size0Maximum queue size. 0 means unlimited
config.consumer.poll_interval1Seconds between consumer polls

max_bytes bounds memory rather than message count. The size is estimated from the average size of the iterations produced so far, so set it when a source returns large pages.

  • In-memory only: queued messages are lost if the process dies, and the run resumes from the last checkpoint
  • Producer and consumer run in the same process (thread runner) or in two worker processes (process runner)

Durability comes from checkpointing, not from the queue, so an external broker isn’t needed for reliability. To scale:

  1. Tune the buffer: raise the destination’s buffer_size and set max_bytes to bound memory
  2. Split the work: run one pipeline per stream, each with its own config and job
  3. Stream from Kafka: for continuous ingestion, read Kafka with the stream runner, or use bizon-rs, a native Rust worker for Kafka to bigquery_streaming_v2 stream pipelines