Files
pgsql-broker/broker.example.yaml
SG Command f69cbea49f
Integration Tests / integration-test (pull_request) Successful in 2m33s
feat: add prometheus metrics and dashboard
2026-09-19 05:12:04 +02:00

53 lines
1.7 KiB
YAML

# PostgreSQL Broker Configuration Example
# Database connections settings
# The broker can manage multiple databases, each with its own instance and queues
# Important: Each database can only have ONE active broker instance
databases:
# First database
- name: db1 # Unique identifier for this database connection
host: localhost
port: 5432
database: broker_db1
user: postgres
password: your_password_here
sslmode: disable # Options: disable, require, verify-ca, verify-full
max_open_conns: 25
max_idle_conns: 5
conn_max_lifetime: 5m
conn_max_idle_time: 10m
queue_count: 4 # Number of concurrent queues for this database
# Second database (optional - add as many as needed)
- name: db2
host: localhost
port: 5432
database: broker_db2
user: postgres
password: your_password_here
sslmode: disable
max_open_conns: 25
max_idle_conns: 5
conn_max_lifetime: 5m
conn_max_idle_time: 10m
queue_count: 2 # Can have different queue count per database
# Broker settings (applied to all database instances)
broker:
name: pgsql-broker
fetch_query_que_size: 100 # Number of jobs to process per fetch cycle
queue_timer_sec: 10 # Seconds between queue polls
queue_buffer_size: 50 # Size of job buffer per queue
worker_idle_timeout_sec: 10 # Worker idle timeout
notify_retry_seconds: 30s # LISTEN/NOTIFY retry interval
enable_debug: false # Enable debug logging
metrics_enabled: true # Expose Prometheus and the embedded dashboard
metrics_host: 0.0.0.0
metrics_port: 9469
queue_depth_poll_sec: 15
# Logging settings
logging:
level: info # Options: debug, info, warn, error
format: json # Options: json, text