Re: Counterintuitive behavior in S3 producer and consumer
Hi Yeah we have had this in some of the other messaging component (jms, rabbitmq, kafka etc.) in those we have introduced an XXX_OVERRIDE header, that overrides the endpoint destination. This allows in those components to make them use in situations like yours with from A to B Maybe we can do something similar for the AWS component ( and maybe also for the other cloud like azure and google) Otherwise the usual trick is to remove the header / or headers from A remove Headers to B On Fri, Jul 14, 2023 at 11:04 PM Anthony Wu wrote: > Hi folks, > > I noticed something odd in Camel 3.14.x where, if you have a > from("aws2-s3://bucket1") and a to("aws2-s3://bucket2") - basically a > download, some processing in the middle, and an upload of a different file > and a different bucket (where the KEY header is set to tell Camel which > file to use), bucket1 is apparently sticky and only overriding the > BUCKET_NAME header before processing the upload works. > > Is this known behavior with the way Camel processes message bodies/headers > for the S3 component in particular? I would have expected the explicit > bucket name in the Camel URI to override the settings, but apparently it > doesn't take. I'm wondering if this qualifies as a bug or perhaps something > to point out in documentation. > > Happy to attach a test if folks are having trouble reproducing. > > Anthony > -- Claus Ibsen - @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: Counterintuitive behavior in S3 producer and consumer
By the way I'll have another look. I don't remember this behavior, at least not with bucket2 explicit in the URI Il ven 14 lug 2023, 23:42 Andrea Cosentino ha scritto: > This is a known behavior. > > You need to override the header explicitly. > > Il ven 14 lug 2023, 23:05 Anthony Wu ha scritto: > >> Hi folks, >> >> I noticed something odd in Camel 3.14.x where, if you have a >> from("aws2-s3://bucket1") and a to("aws2-s3://bucket2") - basically a >> download, some processing in the middle, and an upload of a different file >> and a different bucket (where the KEY header is set to tell Camel which >> file to use), bucket1 is apparently sticky and only overriding the >> BUCKET_NAME header before processing the upload works. >> >> Is this known behavior with the way Camel processes message bodies/headers >> for the S3 component in particular? I would have expected the explicit >> bucket name in the Camel URI to override the settings, but apparently it >> doesn't take. I'm wondering if this qualifies as a bug or perhaps >> something >> to point out in documentation. >> >> Happy to attach a test if folks are having trouble reproducing. >> >> Anthony >> >
Re: Counterintuitive behavior in S3 producer and consumer
This is a known behavior. You need to override the header explicitly. Il ven 14 lug 2023, 23:05 Anthony Wu ha scritto: > Hi folks, > > I noticed something odd in Camel 3.14.x where, if you have a > from("aws2-s3://bucket1") and a to("aws2-s3://bucket2") - basically a > download, some processing in the middle, and an upload of a different file > and a different bucket (where the KEY header is set to tell Camel which > file to use), bucket1 is apparently sticky and only overriding the > BUCKET_NAME header before processing the upload works. > > Is this known behavior with the way Camel processes message bodies/headers > for the S3 component in particular? I would have expected the explicit > bucket name in the Camel URI to override the settings, but apparently it > doesn't take. I'm wondering if this qualifies as a bug or perhaps something > to point out in documentation. > > Happy to attach a test if folks are having trouble reproducing. > > Anthony >
Counterintuitive behavior in S3 producer and consumer
Hi folks, I noticed something odd in Camel 3.14.x where, if you have a from("aws2-s3://bucket1") and a to("aws2-s3://bucket2") - basically a download, some processing in the middle, and an upload of a different file and a different bucket (where the KEY header is set to tell Camel which file to use), bucket1 is apparently sticky and only overriding the BUCKET_NAME header before processing the upload works. Is this known behavior with the way Camel processes message bodies/headers for the S3 component in particular? I would have expected the explicit bucket name in the Camel URI to override the settings, but apparently it doesn't take. I'm wondering if this qualifies as a bug or perhaps something to point out in documentation. Happy to attach a test if folks are having trouble reproducing. Anthony