Configuration file
The main configuration file isconfig.yaml in the project root. You can specify an alternate path with the --config flag:
Configuration structure
The configuration file is organized into sections:Database configuration
MongoDB connection settings:Parameters explained
Parameters explained
- host: MongoDB hostname or IP address
- port: MongoDB port (default: 27017)
- name: Database name for alert storage
- max_pool_size: Maximum concurrent database connections (important for worker scaling)
- replica_set: MongoDB replica set name (null for standalone)
- username: Database authentication username
- password: Set via environment variable for security
- srv: Use MongoDB SRV connection string (for Atlas)
Redis configuration
Redis/Valkey connection for in-memory queues:Redis password authentication is not currently implemented but is planned for future releases.
Kafka configuration
Consumer configuration
Kafka consumer settings per survey:ZTF consumer
ZTF consumer
- server: Kafka broker address
- group_id: Consumer group ID for offset management
LSST consumer
LSST consumer
- server: Kafka broker address (may require SASL authentication)
- schema_registry: Confluent Schema Registry URL for schema retrieval
- schema_github_fallback_url: GitHub repo URL for schema fallback if registry is unavailable
- group_id: Consumer group ID
- username: SASL username for authenticated access
- password: SASL password
DECam consumer
DECam consumer
- server: Kafka broker address
- group_id: Consumer group ID
Producer configuration
Kafka producer for filter output:There is currently only one producer configuration shared by all filter workers. Per-survey producers may be added in future releases.
Worker configuration
Worker pool sizes per survey:Setting
n_workers: 0 for a stage disables it entirely. For example, DECam enrichment is disabled by default.Crossmatch configuration
Catalog crossmatching parameters per survey:Crossmatch parameters
Crossmatch parameters
- catalog: MongoDB collection name containing catalog data
- radius: Search radius in arcseconds
- use_distance: Enable distance-based filtering (for spectroscopic catalogs)
- distance_key: Field name containing distance/redshift (e.g., “z” for redshift)
- distance_max: Maximum distance in Mpc for extended search
- distance_max_near: Maximum search radius in arcseconds when nearby
- projection: MongoDB projection specifying which fields to return (reduces memory usage)
- max_results: Maximum number of matches to return (optional, defaults to 1)
Projections are critical for performance. Only include fields you need - large catalogs can have hundreds of fields.
Distance-based crossmatching
For catalogs like NED with distance information, BOOM can adjust the search radius based on the target’s distance:- Nearby objects (within
distance_max_neararcseconds): Use fullradius - Distant objects: Scale radius based on physical distance up to
distance_maxMpc
API configuration
HTTP API settings (under development):Babamul configuration
Babamul web interface settings:Environment variables
Sensitive configuration values should be set via environment variables, not committed toconfig.yaml.
Environment variable naming
Environment variables use a hierarchical naming convention:__ represent nested levels in the YAML structure.
Common environment variables
.env file for development
For local development, create a.env file in the project root:
.env with your local settings:
Logging configuration
Logging is configured via environment variables:Log level
Set theRUST_LOG environment variable:
trace: Very detailed, includes function entry/exitdebug: Detailed information for debugginginfo: General informational messageswarn: Warning messageserror: Error messagesoff: Disable logging
The
ort crate (ONNX Runtime) is noisy at INFO level, so BOOM defaults to filtering it to ERROR.Span events
Enable span lifecycle events for profiling:new: Log when spans are createdenter: Log when spans are enteredexit: Log when spans are exitedclose: Log when spans close (includes execution time)active: Log when spans become activefull: Enable all span eventsnone: Disable span events (default)
The
close event is particularly useful as it includes execution time, helping identify performance bottlenecks.Example: Debug mode with profiling
Configuration validation
BOOM validates configuration at startup and will exit with an error if:- Required fields are missing
- Environment variables reference non-existent sections
- Worker counts are negative
- Database connection fails
- Redis connection fails
Production configuration checklist
Security
- Set all sensitive values via environment variables
- Use strong passwords for MongoDB and API authentication
- Never commit
.envfiles or credentials to version control - Use MongoDB replica sets with authentication in production
Performance
- Set
max_pool_size≥ total worker count - Tune worker counts based on load testing
- Configure appropriate crossmatch radii (smaller = faster)
- Use projections to limit returned catalog fields
Reliability
- Configure Kafka consumer
group_idfor offset persistence - Set unique
instance_idfor each scheduler/consumer instance - Enable MongoDB replica sets for high availability
- Monitor queue depths and adjust worker counts
Multi-survey configuration
BOOM can process multiple surveys simultaneously by running separate scheduler instances:- Redis queues:
alerts_ztf,alerts_lsst - MongoDB collections:
alerts_ztf,alerts_lsst - Worker pools (configured independently)
- Kafka topics and consumer groups
Surveys share the same MongoDB database and Redis instance but use separate collections and queues.
Configuration tips
Development settings
Production settings
Start with conservative worker counts and scale up based on monitoring data. Over-provisioning wastes resources; under-provisioning causes queue buildup.