Re: Behavior of aggregation and file path in Camel Kafka Connector

2023-10-06 Thread Andrea Cosentino
Hello,

The aggregation works in the following way, if you have the message 1  and
2 and an aggregation size of 2, you'll get a file with 1,2 as content and
an exchange Id as file name if you don't specify the header, otherwise it
should be the last header you sent as file name.

It doesn't distinguish between file name, because it's a general camel
concept and is not related to the specific component.

If you have to do something like that, probably it would be better to use
plain camel, so you should be able to cover your case.

Cheers.

Il giorno ven 6 ott 2023 alle ore 08:57 Satoshi Yamada <
satoshi.yamada@gmail.com> ha scritto:

> Hi community,
>
> I'm using camel-azure-storage-blob-sink-kafka-connector from k8s, and let
> kafkaconnect upload the logs (Kafka messages) to Azure Blob.
> I've used message header to specify the file path, and also use aggregation
> options in Camel as follows
>
> camel.aggregation.size: 2
> camel.aggregation.timeout: 360
>
> I've expected Camel Kafka Connector to aggregate the logs per file
> name, which is specified in the message header. For example, if we
> produce 6 messages with the following messages headers in order
>
> Message 1: CamelHeader.file=A
> Message 2: CamelHeader.file=B
> Message 3: CamelHeader.file=C
> Message 4: CamelHeader.file=A
> Message 5: CamelHeader.file=B
> Message 6: CamelHeader.file=C
>
> Then, I expected files named "A" containing message 1 and 4, "B"
> containing message 2 and 5, and "C" containing message 3 and 6 will be
> uploaded to Azure, but actually it doesn't and it seems a file
> containing message 1 and 2 are there with file name "A" or "B", a file
> with message 3 and 4 with file name "C" or "A", and a file with
> message 5 and 6 with file name "B" or "C" are there.
>
> I want to confirm with the community if this is the expected behavior
> in Camel Kafka Connector.
> I'm using camel-azure-storage-blob-sink-kafka-connector-3.18.2 and use
> `uploadBlockBlob` for `CamelHeader.CamelAzureStorageBlobOperation`.
>
> Thanks in advance,
> Satoshi
>


Behavior of aggregation and file path in Camel Kafka Connector

2023-10-06 Thread Satoshi Yamada
Hi community,

I'm using camel-azure-storage-blob-sink-kafka-connector from k8s, and let
kafkaconnect upload the logs (Kafka messages) to Azure Blob.
I've used message header to specify the file path, and also use aggregation
options in Camel as follows

camel.aggregation.size: 2
camel.aggregation.timeout: 360

I've expected Camel Kafka Connector to aggregate the logs per file
name, which is specified in the message header. For example, if we
produce 6 messages with the following messages headers in order

Message 1: CamelHeader.file=A
Message 2: CamelHeader.file=B
Message 3: CamelHeader.file=C
Message 4: CamelHeader.file=A
Message 5: CamelHeader.file=B
Message 6: CamelHeader.file=C

Then, I expected files named "A" containing message 1 and 4, "B"
containing message 2 and 5, and "C" containing message 3 and 6 will be
uploaded to Azure, but actually it doesn't and it seems a file
containing message 1 and 2 are there with file name "A" or "B", a file
with message 3 and 4 with file name "C" or "A", and a file with
message 5 and 6 with file name "B" or "C" are there.

I want to confirm with the community if this is the expected behavior
in Camel Kafka Connector.
I'm using camel-azure-storage-blob-sink-kafka-connector-3.18.2 and use
`uploadBlockBlob` for `CamelHeader.CamelAzureStorageBlobOperation`.

Thanks in advance,
Satoshi