Prompt
Do I need a pub/sub system for telemetry and logs?
Latest observation
Not always.
Short answer
You need a pub/sub system for telemetry and logs if you want to fan out the same events to multiple consumers independently—for example:
- real-time alerting
- long-term storage
- stream processing
- dashboards
- security/anomaly detection
If you’re only sending telemetry/logs to one backend or a small number of tightly coupled destinations, pub/sub may be unnecessary overhead.
When pub/sub helps
Use pub/sub if you need:
- decoupling between producers and consumers
- multiple subscribers reading the same data
- buffering / burst absorption
- scalability
- easy addition/removal of consumers
- asynchronous processing
Common example: apps emit logs/metrics/events to a broker, and separate services consume them for indexing, alerting, and analytics.
When you probably don’t need it
You may not need pub/sub if:
- telemetry goes straight to one observability platform
- your volume is low/moderate
- you don’t need real-time branching to multiple systems
- you prefer simpler infrastructure
Examples:
- logs shipped directly to Elasticsearch/OpenSearch, Loki, Cloud Logging, etc.
- metrics scraped or pushed directly to Prometheus-compatible systems
Important nuance
For telemetry/logs, people sometimes say “pub/sub” but mean different things:
- Message broker / event bus for internal distribution
- Logging pipeline or observability pipeline
- Streaming platform like Kafka, Pulsar, Kinesis, or Pub/Sub
You don’t necessarily need a full broker unless you have those distribution needs.
Rule of thumb
- Simple setup: direct export is enough
- Growing system / many consumers / high volume: pub/sub becomes valuable
- Need reliability + replay + decoupling: strongly consider a streaming/pub-sub layer
If you want, I can help you decide based on your exact setup (e.g., number of services, log volume, cloud provider, and destinations).