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#_endpoint_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 > > > > >