Hello,
I currently facing an issue on node azure function using eventHubTrigger with cardinality set to many and dataType to binary.
Here is my function.json file :
{
"bindings": [
{
"type": "eventHubTrigger",
"name": "eventHubMessages",
"direction": "in",
"eventHubName": _"topic-name",_
"connection": "EventHubConnexion",
"cardinality": "many",
"consumerGroup": "$Default",
"dataType": "binary"
}
],
"scriptFile": "../dist/EventHubTrigger/index.js"
}
In fact, I set up a MirrorMaker which send datas from a kafka bus on a personal eventHub. Kafka datas are avro datas with single object encoding sent as binary buffer.
When my azure function trigger on my eventHub, I get the datas on an array but it's an array of strings and not bytes while datatype is set to binary. Moreover, when i set cardinality to one and not many, datas have good format but I don't want to use this cardinality because it is bad for performances.
I need to get this frames as bytes buffer with cardinality to many because i need to decode frames for extract all usefulls datas.
To prevent this issue I also tried to convert frames stringified thank to the Buffer.from method but it seems string convertion is wrong because when I try to decode, then i have an error while it's work with the buffer given when I set cardinality to one.
Is it a known issue, specific to nodejs, or an abnormal behavior ?
Hello,
I currently facing an issue on node azure function using eventHubTrigger with cardinality set to many and dataType to binary.
Here is my function.json file :
In fact, I set up a MirrorMaker which send datas from a kafka bus on a personal eventHub. Kafka datas are avro datas with single object encoding sent as binary buffer.
When my azure function trigger on my eventHub, I get the datas on an array but it's an array of strings and not bytes while datatype is set to binary. Moreover, when i set cardinality to one and not many, datas have good format but I don't want to use this cardinality because it is bad for performances.
I need to get this frames as bytes buffer with cardinality to many because i need to decode frames for extract all usefulls datas.
To prevent this issue I also tried to convert frames stringified thank to the
Buffer.frommethod but it seems string convertion is wrong because when I try to decode, then i have an error while it's work with the buffer given when I set cardinality to one.Is it a known issue, specific to nodejs, or an abnormal behavior ?