Azure / Azure/azure-functions-host

ServiceBus binding does not support binary data type for non C# languages

Open
#3,125 8 comments 0 reactions 0 assignees View on GitHub
bug needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

When you send binary data via a service bus message it shows up as `"String": "System.Byte[]"`
instead of the actual data.

There is some relevant data in this PR
https://github.com/Azure/azure-functions-python-worker/pull/158

Sample protobuff message
```

{
"Origin": "Host",
"MessageType": "InvocationRequest",
"WorkerId": "dc1036ce-8a25-4fa9-9311-189562f33dd5",
"Message": {
"RequestId": "",
"InvocationRequest": {
"InvocationId": "676e0dbd-b2d6-4909-838a-22f8a72d4cc7",
"FunctionId": "13972e81-2479-4bc7-ad0e-589830026c12",
"InputData": [
{
"Name": "msg",
"Data": {
"String": "System.Byte[]",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "String"
}
}
],
"TriggerMetadata": {
"DeliveryCount": {
"String": "",
"Json": "1",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "Json"
},
"DeadLetterSource": {
"String": "",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "None"
},
"ExpiresAtUtc": {
"String": "",
"Json": "\"2018-07-12T14:36:59.104Z\"",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "Json"
},
"EnqueuedTimeUtc": {
"String": "",
"Json": "\"2018-06-28T14:36:59.104Z\"",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "Json"
},
"MessageId": {
"String": "cf6fa1fe04ac4cd19b6b625bd284e51c",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "String"
},
"ContentType": {
"String": "text/plain",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "String"
},
"ReplyTo": {
"String": "",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "None"
},
"SequenceNumber": {
"String": "",
"Json": "31806672368304129",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "Json"
},
"To": {
"String": "",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "None"
},
"Label": {
"String": "",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "None"
},
"CorrelationId": {
"String": "",
"Json": "",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "None"
},
"UserProperties": {
"String": "",
"Json": "{\"$AzureWebJobsParentId\":\"06ea352e-e884-4ce1-8fc1-48fc84edc6e8\",\"x-opt-enqueue-sequence-number\":0}",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "Json"
},
"sys": {
"String": "",
"Json": "{\"MethodName\":\"servicebus_trigger\",\"UtcNow\":\"2018-06-28T14:36:59.2639206Z\",\"RandGuid\":\"1476de8c-1ae2-4005-a4e2-4eae017ecd46\"}",
"Bytes": [],
"Stream": [],
"Int": 0,
"Double": 0.0,
"DataCase": "Json"
}
}
},
"ContentCase": "InvocationRequest"
},
"Name": "InvocationRequest",
"Source": "Rpc"
}
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Azure Functions host's Service Bus binding path for InvocationRequest data, then compare the behavior with the linked azure-functions-python-worker PR. Done means binary Service Bus payloads are exposed as actual binary data for non-C# languages instead of the string "System.Byte[]".

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.