Access to Service Bus message application properties for trigger and output
emilwihlander opened this issue · 0 comments
emilwihlander commented
When using the spring-cloud-azure-starter-servicebus
library for regular Spring Boot applications you can use the wrapper class ServiceBusMessage
to get and set the application properties (message.getApplicationProperties().put("key", "value")
, for example).
But when I setup an Azure Function I have found no way to either get application properties from incoming message, nor being able to set it for outgoing messages.
@Component
public class UppercaseFunction {
@FunctionName("uppercase")
public void run(
@ServiceBusQueueTrigger(/* config */) String message,
@ServiceBusQueueOutput(/* config */) OutputBinding<String> output) {
// How would I read application properties from the incoming message?
output.setValue(message.toUpperCase());
// How would I set application properties on the outgoing message?
}
}
Have I missed some part of the documentation or is this not supported?