I am trying to get SessionId, DeliveryCount from an Azure Service Bus Queue trigger in a Java Azure function. I am able to do this easily in a C# Function App. Somehow I found a way to get the Application Properties using binding. But unfortunately am unable to get the above mentioned properties. Any help is appreciated.
@FunctionName("ServiceBusQueueTriggerJava")
public void run(
@ServiceBusQueueTrigger(name = "message", queueName = "%ServiceBusQueue%", connection = "ServiceBusConnString", isSessionsEnabled = true) String message,
final ExecutionContext context, @BindingName("ApplicationProperties") Map<String, Object> 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);
}