Just for the completeness,
Here's the lastest version of my custom PollingConsumerStrategy
https://gist.github.com/anonymous/17465c5ff78d9b75726563dc7727d5ae
It allows me to detect the specific error from Amazon and pass null down
the route, or propagate the error in any other case.
Is that a s
Right,
So I managed to get that working, though I am not sure if that's the proper
way of doing this or more of a hack.
So again, I want to use pollEnrich() to fetch a specific file from S3. If a
file doesn't exist then I want to pass a null message down the route. To
simplify things let's say tha
I will try that, thank you for the hint!
On Wed, Jun 21, 2017 at 5:40 PM, Taariq Levack wrote:
> Then you can try the custom pollStrategy.
>
>
> On 21 Jun 2017 10:57, "Artur Jablonski" wrote:
>
> > Hello!
> >
> > Thanks for the hint
> >
> > So that works... kind of.
> >
> > First, with timeout
Then you can try the custom pollStrategy.
On 21 Jun 2017 10:57, "Artur Jablonski" wrote:
> Hello!
>
> Thanks for the hint
>
> So that works... kind of.
>
> First, with timeout(0) it doesn't work, it won't even try to poll for
> anything. I suppose that's how it's supposed to work. Fine.
>
> Wit
Hello!
Thanks for the hint
So that works... kind of.
First, with timeout(0) it doesn't work, it won't even try to poll for
anything. I suppose that's how it's supposed to work. Fine.
With timeout(>0) it works, as in it gives up after the given number of
milliseconds and null is propagated down
You can use a timeout of 0 for receiving with no wait, or greater than 0
for waiting a bit.
Default is -1
http://camel.apache.org/content-enricher.html
Cheers,
Taariq
On 20 Jun 2017 22:12, "Artur Jablonski" wrote:
> Right, that almost works.
>
> Now the problem I have is that when a file I ask
Right, that almost works.
Now the problem I have is that when a file I ask for doesn't exist the
consumer seems to be polling for it indefinitely. Is there a way of saying:
hey polling consumer, try n times and then give up. Throw an error or
return null. Don't insist, please.
Cheers
Artur
On 20
Thank you so much Gregor!
You pushed me in the right direction. I initially wrote a patch for S3
producer to get me what I wanted, but after seeing your reply I read about
the content enricher pattern and pollEnrich() in Camel.
This SO was helpful as well
https://stackoverflow.com/questions/36948
Hi Artur,
You should be able to get a single S3 object with the camel-aws
component using the "fileName" query parameter on the consumer. See
the documentation at
https://github.com/apache/camel/blob/master/components/camel-aws/src/main/docs/aws-s3-component.adoc.
Gregor
On Mon, Jun 19, 2017 at
Hello,
I am trying to get a single object from S3 via Camel and I am not sure how
to do this.
It seems that the producer endpoint can only upload to S3 and the consumer
endpoint can poll a bucket, but how can express a use case of retrieving a
single S3 object when I know it's key?
Best
Artur
10 matches
Mail list logo