davsclaus opened a new pull request, #30434:
URL: https://github.com/apache/camel/pull/30434

   ## Description
   
   [CAMEL-27197](https://issues.apache.org/jira/browse/CAMEL-27197): the 
producer option `batcherBuilder` is listed as an enum (`DEFAULT`, `KEY_BASED`), 
but `org.apache.pulsar.client.api.BatcherBuilder` is an interface whose two 
values are static fields. Camel had no type converter for it, so 
`batcherBuilder=KEY_BASED` (or `DEFAULT`) in a URI or a property failed with 
`No type converter available to convert from type: java.lang.String to the 
required type: org.apache.pulsar.client.api.BatcherBuilder`. Only a bean 
reference worked.
   
   - New `PulsarTypeConverters` (generated loader): `DEFAULT` and `KEY_BASED`, 
any case, map to `BatcherBuilder.DEFAULT` and `BatcherBuilder.KEY_BASED`. Any 
other name fails with a message that lists the valid values. A `#bean:` 
reference still works as before.
   - The option description now says what the two values do and that a custom 
`BatcherBuilder` bean can be given. The catalog and the component and endpoint 
DSLs are regenerated.
   
   Needed for the `batcherBuilder` option of the `pulsar-sink` Kamelet 
(apache/camel-kamelets#3280): key-based batching, so that a `Key_Shared` 
subscription spreads the keys while batching stays on.
   
   ## Tests
   
   `PulsarProducerBatcherBuilderTest` creates the producers on a mocked 
`PulsarClient` with the real `ProducerBuilderImpl`, and checks the batcher 
builder in its configuration for `KEY_BASED` and `DEFAULT` from the URI. It 
also covers a lower-case name, the default when the option is not set, and the 
error for an unknown name. Without the converter, all 5 tests fail.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to