Hello.

Again a question about the AWS component (S3). What is the best way to set
the CamelAwsS3Key header?

I did it this way:
from("file:files/inbox").setHeader(S3Constants.KEY, simple("Static
Key")).......

The test in the source code does this:

        Exchange exchange = template.send("direct:start",
ExchangePattern.InOut, new Processor() {
            public void process(Exchange exchange) throws Exception {
                exchange.getIn().setHeader(S3Constants.KEY,
"CamelUnitTest");
                exchange.getIn().setBody("This is my bucket content.");
            }

If the key is null, then the following is called in the camel aws code:
throw new IllegalArgumentException("AWS S3 Key header missing.");

Thus, I have to set a key (of course it must not be null due to the S3
service!). 
Nevertheless, I also managed to do it automatically: In my first try, the
key was message1.xml and message2.xml -> I did not set a header. The name of
the files was used.

Unfortunately, I cannot reproduce this. Italways get the exception, if  I do
not set the header. Can you please help me out? What is the configuration
that the header is set automatically?

Thank you...

Best regards,
Kai
       

--
View this message in context: 
http://camel.465427.n5.nabble.com/AWS-Component-S3-Best-way-to-set-the-CamelAwsS3Key-Header-tp4746938p4746938.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to