#10540·dapr

Expose the number of in-flight pub/sub messages per subscription as a metric

Author: MyMirelHubCreated Sep 23, 2026Updated Sep 24, 2026
Labelskind/enhancement

Describe the feature

There is no metric for how many messages a pub/sub subscription currently has in flight, so concurrency can only be tuned by trial and error.

Nothing existing substitutes. component/pubsub_ingress/latencies is only recorded once a handler returns, so anything derived from it caps out at the configured concurrency and reports the setting back rather than the demand. The remaining option is broker-specific: on Redis Streams, XPENDING or the exporter's redis_stream_group_messages_pending. That measures something different, since the pending list includes messages read but not yet started.

The number is not new information to the runtime. subscription.inflight is incremented when a message is handed to the handler (L157) and decremented on completion. It is used only for the shutdown drain and is never exposed.

Release Note

RELEASE NOTE: ADD Metric for the number of pub/sub messages a subscription currently has in flight.