apache / apache/iotdb

[Feature request] Expose complete MQTT publish context to PayloadFormatter

Đang mở
#18,625 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
6.4k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
115

Mô tả

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Motivation

Currently, the MQTT `PayloadFormatter` interface receives only the topic and payload.

For custom MQTT ingestion scenarios, it would be helpful if `PayloadFormatter` could also access additional MQTT publish metadata, such as:

- client ID
- username
- QoS
- topic
- payload

In particular, access to `clientId` is useful when the MQTT connection identity needs to be preserved as part of the stored data.

It would therefore be helpful if the formatter API could expose the complete MQTT publish context rather than only `topic` and `payload`.

Backward compatibility with existing custom `PayloadFormatter` implementations would also be appreciated.

Thank you for considering this enhancement.

### Solution

_No response_

### Alternatives

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Locate the MQTT PayloadFormatter interface and its existing implementations, then trace how MQTT publish topic and payload reach the formatter. Determine how the complete publish context and backward compatibility should be represented; done means custom formatters can access the requested metadata without breaking existing implementations.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
backend-api-design, databases
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.