Azure / Azure/azure-functions-dotnet-worker
ServiceBusOutput does not support byte[] as claimed
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
### Description
The documentation says that [ServiceBusOutput] supports returning byte[], string, or an object which will be serialized as JSON.
When I specify return type as byte[] and return a byte[], the message body that results is the literal string "System.Byte[]" - as if the framework is calling ToString() on the byte array.
### Steps to reproduce
```
[Function(nameof(ForwardToQueue))]
[ServiceBusOutput("OutputQueueName", Connection = "Connection")]
public byte[] ForwardToQueue(
[ServiceBusTrigger("InputQueueName", Connection = "Connection")]byte[] message)
{
return message;
}
```
Expected: The function forwards a message with the same body to another queue.
Actual: The function creates a message with the literal body "System.Byte[]"
Microsoft.Azure.Functions.Worker.Sdk 1.17.2
Microsoft.Azure.Functions.Worker.Extensions.ServiceBus 5.20.0
.NET 6 isolated
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.