loguylo commented on PR #11413:
URL: https://github.com/apache/nifi/pull/11413#issuecomment-4948710446
After further research, it seems like the correct behavior is shown here.
Based on the documentation, the `enable.idempotence `property of the kafka
producer should be blocked behind the constraint that `acks=all
`(`DELIVERY_GUARANTEE=DELIVERY_REPLICATED`). Furthermore, transactions should
be locked behind the constraint that `enable.idempotence` is set to `true`.
It means that `enable.idempotence` should be set to false unless `acks=all`.
if `acks=all` we can let the user choose whether he wants to set
`enable.idempotence` to be `true`/`false`. Additionally, transactions should be
turned off, unless `enable.idempotence` is set to `true`. in that case, we can
let the user choose whether he wants to use transactions or not.
The current implementation simply asks the user to disable transactions if
acks!=all.
I believe the structure should look like that -
```java
ENABLE_IDEMPOTENCE = PropertyDescriptor.Builder()
.dependsOn(DELIVERY_GUARANTEE, DeliveryGuarantee.DELIVERY_REPLICATED);
TRANSACTIONS_ENABLED = new PropertyDescriptor.Builder()
.dependsOn(ENABLE_IDEMPOTENCE, "true");
TRANSACTIONAL_ID_PREFIX = new PropertyDescriptor.Builder()
.dependsOn(TRANSACTIONS_ENABLED, "true");
```
This also means that the deafult value of `ENABLE_IDEMPOTENCE` and the
default value of `TRANSACTIONS_ENABLED` should be set to false, in order to
avoid conflicting configurations
What do you think?
--
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]