Azure / azure-functions-java-library

Contains annotations for writing Azure Functions in Java
MIT License
42 stars 42 forks source link

ServiceBusTopicOutput - how to set sessionId to a message #197

Open prmenon-aa opened 1 year ago

prmenon-aa commented 1 year ago

We have been using ServiceBusTopicOutput annotation to get our Azure Function to send messages to a Service Bus queue. This has been working fine. But now a different use case, our output queue needs to be "session enabled".

With the same code as earlier, we are getting this error

The SessionId was not set on a message, and it cannot be sent to the entity. Entities that have session support enabled can only receive messages that have the SessionId set to a valid value.

What additional config do we need for ServiceBusTopicOutput in order to send messages with a sessionId ?