Hi,

you can use CRONSCHEDULEDROUTEPOLICY like this

<bean id="startEvery5WD" 
class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
  <!-- start every 5min from monday to saturday -->
  <property name="routeStartTime" value="0 0/5 * ? * 1-6 *" />
</bean>

<route id="testRoute" routePolicyRef="startEvery5WD" autoStartup="false">
   <from uri="azure-storage-blob:/myContainer?regex=test/azure_test.*.csv" />
...
...
</route>


hope it's help

Daniel Langevin
Direction de l’assistance et des technologies
Direction des ressources informationnelles et matérielles
 
Société d’habitation du Québec
Édifice Marie-Guyart
1054, rue Louis-Alexandre-Taschereau
Aile Jacques-Parizeau, 1er étage
Québec (Québec) G1R 5E7
Téléphone : 418 643-4035, poste 1191
Sans frais : 1 800 463-4315





>>> 
De :    <lukas.ange...@spar-ics.com>
À :     <users@camel.apache.org>
Date :  2021-04-08 07:55
Objet :         Scheduled polling with azure-storage-blob consumer?

Hi,

I want to use the azure-storage-blob consumer to download blobs from an azure 
storage.
Very basic route for testing:
from(“azure-storage-blob:/myContainer?regex=test/azure_test.*.csv”)
.to("${body});
This works just fine. However it I can’t figure out how I can set the 
parameters to control the polling

The BlobConsumer class extends ScheduledBatchConsumer, so I figured I could use 
the normal “delay” parameter, but it doesn’t seem to recognize it.
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: 
azure-storage-blob:///myContainer?delay=300000&regex=test%2Fazure_test.*.csv 
due to: There are 1 parameters that couldn't be set on the endpoint. Check the 
uri if the parameters are spelt correctly and that they are properties of the 
endpoint. Unknown parameters=[{delay=300000}]

Also the documentation at 
https://camel.apache.org/components/3.7.x/azure-storage-blob-component.html 
doesn’t mention any of the usual ScheduledConsumer parameters

Is this by design? If yes, what is the correct way to set the polling delay?

Camel version is 3.7.0

regards,
Lukas

[cid:image08b644.PNG@449303a3.4bacba30]<https://www.spar-ics.com/>

Dipl. Ing. (FH) Lukas Angerer
Senior Software Engineer
Business Automation & Integration
<http://>
Phone:  +43 662 4470 84937
Mobile: +43 664 8159143
E-Mail: lukas.ange...@spar-ics.com<mailto:lukas.ange...@spar-ics.com>

SPAR Business Services GmbH
Information & Communication Services
Europastrasse 3, 5015 Salzburg, Austria

<http://>

                [cid:image7c23ff.PNG@3125c888.4bbb0846]

Sollten Sie diese E-Mail unbeabsichtigt bzw. irrtümlich erhalten haben, so 
weisen wir Sie darauf hin, dass gemäß § 93 Abs 4 TKG der Inhalt sowie die 
Tatsache des Empfangs dieser E-Mail weder aufgezeichnet noch verwertet oder 
Unbefugten mitgeteilt werden dürfen. Wir ersuchen Sie, die Nachricht von Ihrem 
System zu löschen und sich mit uns in Verbindung zu setzen.

If you have received this email accidentally or in error, we point out that, in 
accordance with § 93 para. 4 TKG (Telecommunications Act), the contents of this 
email and the fact of its receipt must not be recorded, exploited or 
communicated to unauthorized persons. We ask you to delete the message from 
your system and to contact us.


Reply via email to