Camel 消费者未从 Azure 存储 Blob post maven 升级到 3.10

Camel Consumer not reading from Azure Storage Blob post maven upgrade to 3.10

升级到camel 3.10并升级camel-azure版本后,消费者不再从azure存储容器中读取。 下面是我的设置

之前

骆驼版本 3.4.0

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-azure</artifactId>
            <version>3.4.0</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-storage</artifactId>
            <version>8.4.0</version>
        </dependency>

@Bean
public StorageCredentialsAccountAndKey credentials(String accountName,String key) {
    return new StorageCredentialsAccountAndKey(accountName, key);
}
from(timer://testRoute?fixedRate=true&period=10s)
.to(azure-blob://azureStorageName/azureContainerName?credentials=#credentials&operation=listBlobs)
.process("myProcessor");

之后

骆驼版本 3.10

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-azure-storage-blob</artifactId>
            <version>3.10.0</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-storage</artifactId>
            <version>8.6.6</version>
        </dependency>
@Bean
public StorageSharedKeyCredential credentials(String accountName,String key) {
    return new StorageSharedKeyCredential(accountName, key);
}
from(timer://testRoute?fixedRate=true&period=10s)
.to(azure-storage-blob://azureStorageName/azureContainerName?credentials=#credentials&operation=listBlobs)
.process("myProcessor");

路由已经启动,应用看起来不错,但没有消耗任何东西

INFO  main [camel.spring.boot.CamelSpringBootApplicationListener(onCamelContextStarted:146)] Starting CamelMainRunController to ensure the main thread keeps running
INFO  main [camel.impl.engine.AbstractCamelContext(logStartSummary:2983)] Routes startup summary (total:1 started:1)
INFO  main [camel.impl.engine.AbstractCamelContext(logStartSummary:2988)]     Started testRoute (timer://test)
INFO  main [camel.impl.engine.AbstractCamelContext(logStartSummary:3000)] Apache Camel 3.10.0 (camel-1) started in 877ms (build:28ms init:232ms start:617ms)
INFO  main [nl.ecs.batchfraudscoringadapter.BatchFraudScoringAdapterApplication(logStarted:61)] Started MyApplication in xxx seconds (JVM running for xxx)
INFO  main [springframework.boot.availability.ApplicationAvailabilityBean(logStateChange:75)] Application availability state LivenessState changed to CORRECT
INFO  main [springframework.boot.availability.ApplicationAvailabilityBean(logStateChange:75)] Application availability state ReadinessState changed to ACCEPTING_TRAFFIC
INFO  main [nl.ecs.batchfraudscoringadapter.BatchFraudScoringAdapterApplication(main:28)] MyApplication Started

我在这里错过了什么?

-问候 斯里坎特

谢谢Pasi Österman。将您的建议作为答案发布,以帮助其他社区成员。

camel-azure-storage-blob 使用 Azure SDK 版本 12com.microsoft.azure/azure-storage/8.6.6 适用于 SDK 版本 8

如果您在 myProcessor 中使用它,您可能必须更新处理器才能使用更新版本的 SDK。依赖项 camel-azure-storage-blob 可能已经包含更新版本的 SDK 的依赖项,因此您可以改用它们。

可以参考Camel Azure Storage Blob Service