davidzollo commented on issue #9566: URL: https://github.com/apache/seatunnel/issues/9566#issuecomment-3832585201
> hi [@davidzollo](https://github.com/davidzollo), > > I’d like to implement an MQTT Sink connector (initially sink-only). > > Planned scope: > > * MQTT v3.1.1 > * Publish records to a static topic > * JSON / plain text serialization > * Configurable QoS (0 / 1) > * Batch job compatible > * Basic retry on publish failure. > > Please let me know if this scope aligns with expectations. I've assigned this issue to you. your plan is fine. ### 1. Core Components - **MqttSinkFactory**: Defines configuration options via `OptionRule` (e.g., `url`, `topic`, `username`, `password`, `qos`, `format`). - **MqttSink**: Implements the `SeaTunnelSink` interface to orchestrate the sink lifecycle. - **MqttSinkWriter**: Implements `SinkWriter`, responsible for: - Initializing the Paho MQTT client. - Serializing SeaTunnel rows using `seatunnel-format` API. - Publishing messages to the broker. - Handling connection loss and retries. ### 2. Dependency Management - **Client Library**: `org.eclipse.paho.client.mqttv3` (Stable and widely used implementation for MQTT 3.1.1). - **Formats**: - `seatunnel-format-json` - `seatunnel-format-text` ## Reviewable Steps List - [ ] Create `seatunnel-connectors-v2/connector-mqtt` module directory structure. - [ ] Update root `pom.xml` and `seatunnel-connectors-v2/pom.xml` to register the new module. - [ ] Implement `MqttSinkFactory` and define configuration keys options. - [ ] Implement `MqttSinkWriter` with connection management and publish logic. - [ ] Implement `MqttSink` class. - [ ] Add E2E tests using Testcontainers . - [ ] Update `plugin-mapping.properties` to register the new connector. Here are some helpful resources to get started: - [Contribution Setup Guide](https://seatunnel.apache.org/docs/contribution/setup) - [Code Submission Guide](https://seatunnel.apache.org/community/submit_guide/submit-code) By the way, since this might be your first contribution, I think we can have a more in-depth communication to help you get familiar with SeaTunnel. Feel free to contact me on LinkedIn ([David Zollo](https://www.linkedin.com/in/davidzollo)) . When adding me, please let me know your GitHub ID. I'd be happy to assist you! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
