Azure / azure-functions-servicebus-extension

Service Bus extension for Azure Functions
MIT License
65 stars 35 forks source link

Enable System Property for Value/Sequence AMQP message bodies #152

Closed TsuyoshiUshio closed 2 years ago

TsuyoshiUshio commented 3 years ago

The original issue is https://github.com/Azure/azure-service-bus-java/issues/95 . Currently we have no way to get the message bodies from non-C# languages.

Value/Sequence AMQP message bodies is reside inside of the Microsoft.Azure.ServiceBus.Message internal object BodyObject .

            internal object BodyObject
            {
                get;
                set;
            }

Since the property is internal, so that is not passed to the Language Worker side.

We can fetch the value by the MessageInteropExtensions.GetBody<string>() extension method. I hope it is included as a SystemProperty like this. It might help the customer who want to fetch the Value/Sequence AMQP message

https://github.com/Azure/azure-webjobs-sdk/pull/2129/files https://github.com/Azure/azure-functions-java-worker/blob/dev/endtoendtests/src/main/java/com/microsoft/azure/functions/endtoend/EventHubTriggerTests.java#L27

FYI 5.x discussion. https://github.com/Azure/azure-sdk-for-net/issues/20236

CC: @pragnagopa @alrod

cachai2 commented 2 years ago

Can bind directly to a string in track2 instead of a message object.