Claus Ibsen created CAMEL-23927:
-----------------------------------

             Summary: 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: Bug
          Components: camel-kafka
            Reporter: Claus Ibsen


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