Я пытаюсь получить SessionId, DeliveryCount из триггера очереди служебной шины Azure в функции Java Azure. Я могу легко сделать это в приложении-функции C#. Каким-то образом я нашел способ получить свойства приложения с помощью привязки. Но, к сожалению, я не могу получить вышеупомянутые свойства. Любая помощь приветствуется.
@FunctionName("ServiceBusQueueTriggerJava")
public void run(
@ServiceBusQueueTrigger(name = "message", queueName = "%ServiceBusQueue%", connection = "ServiceBusConnString", isSessionsEnabled = true) String message,
final ExecutionContext context, @BindingName("ApplicationProperties") Map properties) {
Logger log = context.getLogger();
log.info("Java Service Bus Queue trigger function executed.");
properties.entrySet().forEach(entry -> {
log.info(entry.getKey() + " : " + entry.getValue());
});
log.info(message);
}
Подробнее здесь: https://stackoverflow.com/questions/700 ... ction-usin