Open
Description
When working with Azure Functions V2 (Powershell) ServiceBus output binding we are not able to add any user attributes to the servicebus message since the push-outputbinding cmdlet takes the object passed in "value" as the message body (it will serialize the object and submit that as the message text/body). ideally one could craft a Service Bus message of type Microsoft.Azure.ServiceBus.Message and use this object as the input for the push-outputbinding which will then :
- Use the $message.body value as the contents of the serviceBus message,
- Allow us to set any other $message attributes we need and honor them. For example the custom attribute is of upmost importance:
Import-Module .\modules\Microsoft.Azure.ServiceBus.dll
$Message = New-Object Microsoft.Azure.ServiceBus.Message
$Message.UserProperties.Add("name", "alex")
# Should be able to send the message object out also and not just a string
Push-OutputBinding -Name demooutputSbMsg -Value $Message
Instead, when you call push-outputbinding, the whole $message object is processed as the actual body of the message, making it impossible to set custom attributes
Metadata
Metadata
Assignees
Labels
No labels