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

Claus Ibsen updated CAMEL-27820:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-azure-eventhubs for 
CAMEL-23832 (commit 
https://github.com/apache/camel/commit/f9114180c5e7be882210730be747beb6cfc38cb8,
 pull request https://github.com/apache/camel/pull/31140).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. prefetchCount is not applied
{{EventHubsClientFactory.createEventProcessorClient}} never calls 
prefetchCount(...) on the EventProcessorClientBuilder; only 
createEventHubConsumerAsyncClient uses it, and nothing calls that. The consumer 
always uses the SDK default (500).
Proposed change: pass the option (the SDK accepts 1 to 8000).

h4. 2. The message timestamp loses the milliseconds
{{EventHubsConsumer.createAzureEventHubExchange}} sets 
Exchange.MESSAGE_TIMESTAMP to getEnqueuedTime().getEpochSecond() * 1000.
Proposed change: use toEpochMilli().

h4. 3. The offset header uses a deprecated method
CamelAzureEventHubsOffset comes from EventData.getOffset(), deprecated in 5.21 
(Long, or null when not representable), and the header is declared as Integer.
Proposed change: move to getOffsetString() (upgrade-guide entry) and fix the 
declared type.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-azure-eventhubs for 
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31140).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. prefetchCount is not applied
{{EventHubsClientFactory.createEventProcessorClient}} never calls 
prefetchCount(...) on the EventProcessorClientBuilder; only 
createEventHubConsumerAsyncClient uses it, and nothing calls that. The consumer 
always uses the SDK default (500).
Proposed change: pass the option (the SDK accepts 1 to 8000).

h4. 2. The message timestamp loses the milliseconds
{{EventHubsConsumer.createAzureEventHubExchange}} sets 
Exchange.MESSAGE_TIMESTAMP to getEnqueuedTime().getEpochSecond() * 1000.
Proposed change: use toEpochMilli().

h4. 3. The offset header uses a deprecated method
CamelAzureEventHubsOffset comes from EventData.getOffset(), deprecated in 5.21 
(Long, or null when not representable), and the header is declared as Integer.
Proposed change: move to getOffsetString() (upgrade-guide entry) and fix the 
declared type.


_Claude Code on behalf of davsclaus_


> camel-azure-eventhubs: prefetchCount has no effect, the timestamp loses the 
> milliseconds
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27820
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-azure-eventhubs
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-azure-eventhubs for 
> CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/f9114180c5e7be882210730be747beb6cfc38cb8,
>  pull request https://github.com/apache/camel/pull/31140).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. prefetchCount is not applied
> {{EventHubsClientFactory.createEventProcessorClient}} never calls 
> prefetchCount(...) on the EventProcessorClientBuilder; only 
> createEventHubConsumerAsyncClient uses it, and nothing calls that. The 
> consumer always uses the SDK default (500).
> Proposed change: pass the option (the SDK accepts 1 to 8000).
> h4. 2. The message timestamp loses the milliseconds
> {{EventHubsConsumer.createAzureEventHubExchange}} sets 
> Exchange.MESSAGE_TIMESTAMP to getEnqueuedTime().getEpochSecond() * 1000.
> Proposed change: use toEpochMilli().
> h4. 3. The offset header uses a deprecated method
> CamelAzureEventHubsOffset comes from EventData.getOffset(), deprecated in 
> 5.21 (Long, or null when not representable), and the header is declared as 
> Integer.
> Proposed change: move to getOffsetString() (upgrade-guide entry) and fix the 
> declared type.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to