Skip to content

Access to Service Bus message application properties for trigger and output #212

Open
@emilwihlander

Description

@emilwihlander

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions