Я пытаюсь создать простые Java основанные Azure функции с VS Code. Я пытаюсь получить сообщение Topi c из служебной шины.
// local.settings. json (SAS Policy: RadioTopicPolicy = Manage / Read / Listen)
"topicconnstring":"Endpoint=sb://111standardsb.servicebus.windows.net/;SharedAccessKeyName=RadioTopicPolicy;SharedAccessKey
=11111nuAmrb16c3/cGaxe0dYGTz/tiBebTI+peG4zE=;"
This Функция запускается по служебной шине Topi c и сохраняет данные в Data Lake пример привязки
package com.function;
import com.microsoft.azure.functions.annotation.*;
import com.microsoft.azure.functions.*;
/**
* Azure Functions with Azure Storage Queue trigger.
*/
public class TopicTriggerCosmosOutput {
/**
* This function will be invoked when a new message is received at the specified path. The
message contents are provided as input to this function.
*/
@FunctionName("TopicTriggerDataLakeOutput")
public void run(
@ServiceBusTopicTrigger(
name = "message",
topicName = "radioTopic",
subscriptionName = "RadioSubscription",
connection = "topicconnstring"
) String message,
final ExecutionContext context
) {
context.getLogger().info(message);
}
}
Ошибки при отладке в VS Code:
[3.4.2020 12.29.30] Message processing error
(Action=Receive,
ClientId=MessageReceiver1radioTopic/Subscriptions/RadioSubscription,
EntityPath=radioTopic/Subscriptions/RadioSubscription, Endpoint=mystandardsb.servicebus.windows.net)
[3.4.2020 12.29.30] Microsoft.Azure.ServiceBus: Put token failed. status-code: 404, status-
description: The messaging entity
'sb://mystandardsb.servicebus.windows.net/radioTopic/Subscriptions/RadioSubscription' could not be
found. To know more visit
https://aka.ms/sbResourceMgrExceptions. TrackingId:67df5bb7-87fb-48ca-
9e8e-6829c4e3a4a1_G25,
SystemTracker:mystandardsb.servicebus.windows.net:radioTopic/Subscriptions/RadioSubscription,
Timestamp:2020-04-03T12:29:30.