yigitcan-ozturk opened a new pull request, #12519:
URL: https://github.com/apache/seatunnel/pull/12519
## Purpose of this pull request
Follow-up for #11007.
This PR adds declarative nonblank validation for the required RabbitMQ Sink
`queue_name` option, as confirmed in the #11007 tracking issue.
Currently, `RabbitmqSinkFactory.optionRule()` marks `queue_name` as
required, but it does not reject empty or whitespace-only values. The RabbitMQ
Source already applies nonblank validation for its corresponding queue name
option.
This PR keeps the existing Sink requirement and adds `Conditions.notBlank`
so invalid queue names are rejected during declarative option validation.
### Changes
- Add `Conditions.notBlank(RabbitmqSinkOptions.QUEUE_NAME)` to the RabbitMQ
Sink `OptionRule`.
- Add factory validation coverage for:
- valid `queue_name`
- missing `queue_name`
- empty `queue_name`
- whitespace-only `queue_name`
- padded nonblank `queue_name`
- Update the English RabbitMQ Sink documentation to state that `queue_name`
must not be empty or whitespace-only.
- Update the Chinese RabbitMQ Sink documentation with the same requirement.
### Scope
This change is intentionally limited to RabbitMQ Sink `queue_name`,
following the scope confirmed in #11007.
It does not change:
- RabbitMQ Source validation
- connection configuration
- queue declaration behavior
- routing behavior
- remote validation
- runtime broker interaction
Padded nonblank values remain accepted; this PR does not trim or otherwise
normalize `queue_name`.
## Does this PR introduce any user-facing change?
Yes.
RabbitMQ Sink configurations with an empty or whitespace-only `queue_name`
are now rejected during declarative option validation.
Valid nonblank queue names, including padded nonblank values, remain
accepted.
## How was this tested?
Factory validation tests cover:
- valid queue name -> accepted
- missing queue name -> rejected
- empty queue name -> rejected
- whitespace-only queue name -> rejected
- padded nonblank queue name -> accepted
## Checklist
- [x] The change is limited to the scope confirmed in #11007.
- [x] Declarative validation is covered by factory tests.
- [x] English documentation is updated.
- [x] Chinese documentation is updated.
- [x] No RabbitMQ connection or runtime behavior is changed.
--
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]