[ 
https://issues.apache.org/jira/browse/CAMEL-23927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-23927:
--------------------------------
    Issue Type: Improvement  (was: Bug)

> Camel Kafka: metadataMaxAgeMs @UriParam label should be "common" instead of 
> "producer"
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23927
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23927
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kafka
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.22.0
>
>
> The {{metadataMaxAgeMs}} property in {{KafkaConfiguration.java}} is annotated 
> with {{@UriParam(label = "producer")}}, but the property is applied to both 
> consumer and producer Kafka client properties.
> In {{createProducerProperties()}}:
> {code:java}
> addPropertyIfNotEmpty(props, ProducerConfig.METADATA_MAX_AGE_CONFIG, 
> getMetadataMaxAgeMs());
> {code}
> In {{createConsumerProperties()}}:
> {code:java}
> addPropertyIfNotEmpty(props, ConsumerConfig.METADATA_MAX_AGE_CONFIG, 
> getMetadataMaxAgeMs());
> {code}
> The native Kafka client defines {{metadata.max.age.ms}} as a common client 
> config valid for both consumers and producers. Camel correctly passes it to 
> both, but the {{@UriParam}} label causes the documentation and tooling to 
> categorize it as producer-only, which is misleading.
> Integration tests already use this property on consumer endpoints (e.g., 
> {{KafkaConsumerTopicIsPatternIT}}, {{KafkaBreakOnFirstErrorSeekIssueIT}}), 
> confirming the consumer usage is intentional.
> The fix is to change the annotation from {{label = "producer"}} to {{label = 
> "common"}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to