Quick start
This guide will walk you through processing your first astronomical alerts with BOOM using archived ZTF data.This quickstart assumes you have completed the installation guide and have all services running via Docker Compose.
Overview
BOOM’s alert processing pipeline consists of three main components:- Kafka Producer: Publishes alerts to Kafka topics (for testing with archived data)
- Kafka Consumer: Reads alerts from Kafka and queues them in Redis/Valkey
- Scheduler: Manages workers that process, enrich, and filter alerts
Verify services are running
First, ensure all Docker services are running:mongo(MongoDB)valkey(Redis fork)broker(Kafka)prometheus(Metrics)
Step 1: Produce test alerts
BOOM can process alerts from the ZTF public archive. Let’s produce alerts from June 17, 2024:The producer will download archived ZTF alerts and publish them to a Kafka topic. Leave this running in your terminal.
Producer command syntax
Thekafka_producer binary accepts the following arguments:
<SURVEY>: Survey name (e.g.,ztf,lsst,decam)[DATE]: Observation date in YYYYMMDD format[PROGRAMID]: Program identifier (e.g.,publicfor ZTF public alerts)
Clear Kafka topic (optional)
If you want to clear the Kafka topic before starting:Step 2: Consume alerts
In a new terminal, start the Kafka consumer to read alerts and queue them for processing:- Read alerts from the Kafka topic
- Transfer them to Redis/Valkey in-memory queues
- Make them available for the processing pipeline
Consumer command syntax
<SURVEY>: Survey name (must match producer)[DATE]: Observation date (must match producer)--programids: Comma-separated list of program IDs
Step 3: Start the scheduler
In a third terminal, start the scheduler to process alerts:- Spawn alert ingestion workers to format and enrich alerts
- Spawn enrichment workers to run classifiers
- Spawn filter workers to execute user-defined filters
- Manage worker lifecycle and monitor system health
What you’ll see
The scheduler prints diagnostic messages:You won’t see filter worker output initially because no filters are defined. Filter management via the API is coming in a future release.
Step 4: Monitor metrics
BOOM exposes Prometheus metrics for monitoring pipeline performance. Open your browser to:Useful metrics queries
Kafka consumer
View total alerts processed and instantaneous throughputView queries
Alert workers
Monitor alert ingestion worker throughput and processing timeView queries
Enrichment workers
Track enrichment worker performance and batch sizesView queries
Filter workers
Monitor filter execution and alert matchingView queries
Configuration
BOOM’s configuration is defined inconfig.yaml and can be overridden with environment variables.
Worker configuration
The number of workers for each survey is configured inconfig.yaml:
config.yaml
Crossmatch catalogs
BOOM enriches alerts by crossmatching with astronomical catalogs:config.yaml
- PS1_DR1: Pan-STARRS1 Data Release 1
- Gaia_DR3: Gaia Data Release 3
- milliquas_v6: Million Quasars Catalog
- NED: NASA/IPAC Extragalactic Database
- LSPSC: Legacy Survey Proper Star Catalog
Database configuration
Configure MongoDB connection:config.yaml
Kafka configuration
Configure Kafka consumers for different surveys:config.yaml
Logging
BOOM uses theRUST_LOG environment variable to control logging levels:
Log levels
trace: Most verbose, includes all eventsdebug: Debugging informationinfo: Informational messages (default)warn: Warning messageserror: Error messages onlyoff: Disable logging
Per-crate logging
Control logging for specific crates:Span events
Enable span lifecycle events for profiling:new: Span creationenter: Entering a spanexit: Exiting a spanclose: Span closure (includes execution time)active: Active span changesfull: All span eventsnone: No span events
Complete example
Stop BOOM
To stop BOOM gracefully:Stop the scheduler
Press
CTRL+C in the scheduler terminal. The scheduler will send interrupt signals to all workers.Next steps
Architecture
Learn more about BOOM’s modular architecture and worker types
Configuration
Explore advanced configuration options for production deployments
API documentation
Explore the HTTP API for querying alerts and managing filters
Contributing
Contribute to BOOM development on GitHub
Troubleshooting
No alerts being processed
If the scheduler shows no activity:- Verify the producer is running and publishing alerts
- Check the consumer is reading from the correct Kafka topic
- Ensure the survey name and date match across producer, consumer, and scheduler
- Check Docker services are healthy:
docker ps
Connection errors
If you see connection errors:- Verify MongoDB is running:
docker ps | grep mongo - Verify Redis/Valkey is running:
docker ps | grep valkey - Verify Kafka is running:
docker ps | grep broker - Check environment variables in
.envmatchconfig.yaml
High memory usage
If BOOM consumes too much memory:- Reduce the number of workers in
config.yaml - Reduce
max_pool_sizefor MongoDB - Monitor metrics in Prometheus to identify bottlenecks
Slow processing
If alert processing is slow:- Increase the number of workers in
config.yaml - Ensure you’re running with
--releaseflag for optimized builds - Check system resources (CPU, memory, disk I/O)
- Review Prometheus metrics to identify bottlenecks