Quick start
Construct a query, then iterate the matching archive files. The result set contains URLs and metadata you can feed into downstream tooling (e.g., BGPKIT Parser).
use bgpkit_broker::BgpkitBroker;
// Find UPDATE files within a time window
let broker = BgpkitBroker::new()
.ts_start("2024-01-01T00:00:00Z")
.ts_end("2024-01-01T01:00:00Z")
.data_type("updates");
// Iterate matching archive files (URLs point to public collectors)
for item in broker.into_iter().take(10) {
println!("{} {} {}", item.collector_id, item.ts_start, item.url);
} Tip: for automation, treat Broker as the “discovery layer” and parse selected files with BGPKIT Parser.
What Broker returns
Each item represents an archive file (RIB or updates) and includes fields like: timestamp bounds, collector/project identifiers, URL, and size.
updates or rib.
Features
Broker focuses on discovery: finding the right files quickly and reliably so the rest of your pipeline can stay simple.
Archive discovery
Programmatically discover MRT archive files (RIBs/updates) across public collectors by time range and other filters.
Near real-time indexing
Indexes commonly used sources quickly so recent data becomes discoverable with minimal delay.
Library + CLI
Use the Rust library in services and batch jobs, or use the CLI for quick searches and scripting.
Self-hostable
Run your own broker instance when you need local control over indexing cadence, storage, or custom sources.
Common use cases
Incident response
Locate relevant time windows and collectors quickly before deeper parsing/analysis.
Monitoring automation
Drive scheduled pipelines that pull new archive files and feed them into downstream parsers.
BGP research
Build reproducible datasets by selecting precise time ranges, collectors, and data types.
Installation
Use the CLI for interactive usage, or add the crate for programmatic access. For exact versions, refer to crates.io.
Cargo
# CLI install (features: cli)
cargo install bgpkit-broker@^0.10 --features cli
# Library usage (Cargo.toml)
[dependencies]
bgpkit-broker = "0.10" Homebrew
# macOS (Homebrew)
brew install bgpkit/tap/bgpkit-broker Docker
# Run a broker instance with Docker (example)
docker run -d -p 40064:40064 bgpkit/bgpkit-broker:latest Examples
Examples are split by interface: Rust library, CLI, and self-hosting.
Rust: advanced filtering
Constrain the query by time range, collector/project, and dump type. Then iterate a bounded number of results to test quickly.
use bgpkit_broker::BgpkitBroker;
// Narrow by collector/project/type and then page through results.
let broker = BgpkitBroker::new()
.ts_start("2022-01-01") // timestamps: RFC3339, Unix epoch, or pure dates
.ts_end("2022-01-02T00:00:00Z")
.collector_id("rrc00,route-views2") // comma-separated collectors
.project("riperis") // "riperis" or "routeviews"
.data_type("rib") // "rib" or "updates"
.page_size(100) // 1-100000
.page(1);
// Iterate matching archive files (auto-pagination)
for item in &broker {
println!("{}", item);
} CLI: scripting and ad-hoc checks
The CLI is useful for quick lookups and for validating query parameters before you embed them into code.
# Search for updates in a time range
bgpkit-broker search --ts-start "2024-01-01T00:00:00Z" --ts-end "2024-01-01T01:00:00Z" --data-type updates
# List latest files (all collectors)
bgpkit-broker latest
# List peers from a collector (full-feed peers only)
bgpkit-broker peers --collector rrc00 --full-feed-only
# Stream live from a broker NATS server (if configured)
bgpkit-broker live
# Basic health / troubleshooting
bgpkit-broker doctor Self-hosting a broker instance
Self-host when you need local control over storage, indexing cadence, or you want to integrate additional sources.
# Self-host a broker instance backed by SQLite (example)
bgpkit-broker serve broker.sqlite3 --bootstrap --silent
# Customize bind address / port / update cadence
bgpkit-broker serve broker.sqlite3 \
--host 0.0.0.0 \
--port 40064 \
--update-interval 300 \
--root / Public API
The BGPKIT API exposes a REST interface for file discovery. If you don’t want to embed a library, the API is the simplest integration path.
HTTP examples
# Public REST API examples (no auth)
# Search broker index
curl "https://api.bgpkit.com/v3/search?ts_start=1704067200&ts_end=1704070800&data_type=updates"
# Latest indexed files
curl "https://api.bgpkit.com/v3/latest"
# Collector peers (example: full-feed only)
curl "https://api.bgpkit.com/v3/peers?collector_id=rrc00&full_feed_only=true" Interactive docs: https://api.bgpkit.com/docs
Response shape (example)
{
"count": 142,
"page": 1,
"page_size": 100,
"data": [
{
"ts_start": "1704067200",
"ts_end": "1704070800",
"collector_id": "rrc00",
"project": "riperis",
"data_type": "updates",
"url": "https://data.ris.ripe.net/rrc00/2024.01/updates.20240101.0000.gz",
"size": 15728640
}
]
} Want live status/coverage? Use the dashboard: https://ui.broker.bgpkit.com