This end up into an infinite loop if the object does not exists and I don't set 
a timeout for "pollEnrich". I don't want this timeout/delay (hard to set the 
right value to do not interrupt to early) if it doesn't exists. But thanks for 
the suggestion.

Regards
Michael

-----Ursprüngliche Nachricht-----
Von: Marat Gubaidullin <marat.gubaidul...@gmail.com> 
Gesendet: Samstag, 24. August 2024 15:09
An: users@camel.apache.org
Betreff: Re: How do I get just the metadata of a S3 object?

Hinweis: Die Nachricht stammt von einem externen Absender und kann Viren oder 
gefährliche Links enthalten.
Seien sie bitte entsprechend aufmerksam!





If ignoreBody Is only for consumer then perhaps you could try "pollEnrich"
instead of "to"?


On Sat, Aug 24, 2024, 04:01 Andrea Cosentino <anco...@gmail.com> wrote:

> Hello,
>
> The ignoreBody Is only for consumer side.
>
> We can make the option common and manage that In the get object operation.
>
> Or we can create a producer operation for getting only metadata.
>
> I'll open an issue for this and get back to you.
>
> Cheers
>
> Il ven 23 ago 2024, 16:04 Esslinger, Michael 
> <michael.esslin...@barmer.de> ha scritto:
>
> > Hi,
> >
> > how do I get just the S3 object metadata?
> >
> > Regarding the documentation I would assume for the consumer case I 
> > just set the query parameter "ignoreBody=true" (AWS S3 Storage Service ::
> Apache
> > Camel<
> >
> https://camel.apache.org/components/3.21.x/aws2-s3-component.html#_end
> point_query_option_ignoreBody
> > >)
> >
> > But for the producer case, which I want/need to use, with the S3 
> > producer operation "GetObject", this parameter won't work.
> >
> > I am right that I have only the way to close the Stream (Body) by 
> > myself like this?
> >
> >             from("direct:start").process(new Processor() {
> >
> >               @Override
> >               public void process(Exchange exchange) throws Exception {
> >                           
> > exchange.getIn().setHeader(AWS2S3Constants.KEY,
> > "camelKey");
> >               }
> >             })
> >
> >
> .to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=
> getObject")
> >             .process(new Processor() {
> >
> >               @Override
> >               public void process(Exchange exchange) throws 
> > Exception {
> >
> > IOHelper.close(exchange.getIn().getBody(S3Object.class));
> >               }
> >             })
> >             .to("mock:result");
> >
> > Are there any other sugesstions?
> >
> > Regrads,
> > Michael
> >
> >
>

Reply via email to