Skip to content

[Question] Support for Subscribing to Device Connection/Disconnection Events via Integration Executor? #259

@yiqiqq2025

Description

@yiqiqq2025

Description:
Summary
Is it possible to use the Integration Executor in TBMQ to subscribe to and forward device connection/disconnection (online/offline) status change events? For example, capturing events from internal Kafka topics like tbmq.client.session.event.request (e.g., CONNECTION_REQUEST or DISCONNECTION_REQUEST) and routing them to external systems such as HTTP endpoints, Kafka, or another MQTT broker?
Background

TBMQ Version: [2.1.0]
Environment: [Docker, single-node]
Current Setup: We have HTTP integrations working for regular MQTT PUBLISH messages (e.g., via topic filters like tbmq/#), but connection/disconnection events are not triggering forwards since they are control packets, not publishes.
Workaround Attempted: Using LWT for offline events works for publishes, but we'd prefer a broker-level subscription for all connect/disconnect events (including graceful and unexpected disconnections) without modifying device code.

Desired Functionality

Subscribe to internal session events via Integration Executor.
Filter and transform events (e.g., extract client_id, event_type, timestamp).
Forward to external targets (e.g., POST to HTTP with JSON payload: {"deviceId": "device123", "status": "online", "timestamp": 1695335123456}).
Any configuration examples or limitations (e.g., ACL requirements, supported targets)?

Questions

Is this supported out-of-the-box in current versions (e.g., via custom integration configs or YAML rules)?
If not, are there plans to add it, or workarounds like custom plugins/extensions?
Relevant docs or code examples? (E.g., extending the executor to poll Kafka topics.)

Additional Context

This would enable real-time device fleet monitoring without relying on client-side LWT for all scenarios.
References: Integration Executor docs, Architecture overview.

Metadata

Metadata

Labels

QuestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions