How to read blob from one container in java using apache camel and write the same blob to another container

Shakil Shaikh 0 Reputation points
2023-04-18T01:35:51.9733333+00:00

Hi team, My requirement is to read the file i.e. blob from azure storage account demostoarge and container srccontainer using apache camel route. After sucessfully readed it from srccontainer the same bob want to move to archivecontainer which is present in same storage account. This activity need to perform using apache camel route. I have added the dependecy in my project as follows

<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-azure-storage-blob</artifactId>
			<version>3.8.0</version>
		</dependency>

I am trying to read the blob as follows

package com.volante.demo.camel;
import java.util.Set;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.springframework.stereotype.Component;
import org.apache.camel.component.azure.storage.blob.*;
@Component
public class AzureBlobRouterDemo extends RouteBuilder {
	@Override
	public void configure() throws Exception {
		from("azure-storage-blob://camelblobtesting/srccontainer?accessKey=RAW(CtDDDhXCtDPrY5EuzpKVV6u7tdr9JJZ0RlrxI0WCWfU+cwTWQn6RPe6DUmLWyOVQv+ASta98gSg==)").to("file:C://folder3");
	}
}

I tried a lot to read in folder and then after to write the same blob into archive archivecontainer . I would appreciate the support. Thanks!

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,733 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,469 questions
{count} votes