我正在使用捕获事件将事件从 Eventhub 检索到存储容器。但在捕获事件中,我选择了 blob 文件路径格式作为
{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}
现在如何在博客触发器中给出动态 blob 路径。
我写如下
@FunctionName("AzureBlogTriggerFn5")
public void blobHandler(
@BlobTrigger(name = "content", path = "uts-blobcontainer-nb-dev/uts-eventhubns/uts-nb-eventhub/{partition}/{yyyy}/{MM}/{dd}/{HH}/{mm}/{ss}/{fileName}", dataType = "binary", connection = "AzureWebJobsStorage") byte[] content,
@BindingName("fileName") String fileName,
final ExecutionContext context
) throws StorageException, IOException, URISyntaxException, InvalidKeyException, InterruptedException {
context.getLogger().info("Java Blob trigger function processed a blob. Name: " + fileName + "\n Size: " + content.length + " Bytes");
我收到以下错误
**2019-12-19T15:05:52.576 [Error] Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.DecompressServiceFunctionNB'. System.Private.CoreLib: An item with the same key has already been added. Key: mm.**
请建议我,如何在 Azure 的 blogtrigger 中为 partitionId、年、月、日、小时、分钟、秒提供动态路径?