Open soninaren opened 6 years ago
Has this ever been solved. I'm having issues sending bytes data to a Service Bus using the Python library. A simple function example here, where I am triggering on a service bus message, and also outputting one.
def azure_func(msg: func.ServiceBusMessage) -> bytes:
return b"hello world"
On the receiving message bus, it shows up as a string with the content "System.byte[]" and not the actual bytes data
Tagging @fabiocav / @liliankasem for triage
@vrdmr / @gavin-aguiar / @YunchuWang - can you confirm if python language worker supports TypedData : https://github.com/Azure/azure-functions-language-worker-protobuf/blob/6635670b136d565f2a196ce1a64fee1ea5c9c1c9/src/proto/FunctionRpc.proto#L400 ?
@vrdmr / @gavin-aguiar / @YunchuWang , Any updates on this thread? Similar issue is seen here : https://docs.microsoft.com/en-us/answers/questions/855946/index.html
It would be good to understand the data type being used when this occurs.
@uch-energinet would you be able to share your function.json
definition for this?
Yes, of course.
You can see the entire code sample in this repository, which I made for this specific issue:
https://github.com/uch-energinet/github-issue-3125 (the file you are asking for is under HttpTrigger1/function.json
)
I have the same issue here. I have two bindings to an azure function - out and in. The in binary correctly receives binary data, but when I try to write binary to a Service Bus topic it shows as "System.Byte[]". I have set to both bindings "dataType: binary" in function.json. Is it even possible to send binary message via a binding to a Service Bus topic?
This still seems to be an issue with binary data being corrupted into python servicebus trigger. It seems to incorrectly decoding/recoding the bytes as utf8 and replacing errors...
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