Is there way to run a timer based function connected to Event Hubs?
See original GitHub issueThe event hub trigger is executed every time a single event is sent. I’d like to perform various operations on a batch of data from event hub based on a time interval, is there a way to set this up? There wasn’t an option to use Event Hubs as an input when choosing a timer based function.
I saw that there is an archive option on event hubs which will put the data into a blob every X minutes or Y MB in size. I figured I could use a blob trigger for when those created. However, in retrieving that data, I’m not sure how exactly to parse out my data easily:
2016-09-14T18:41:53.190 Objavro.codecnullavro.schema�{"type":"record","name":"EventData","namespace":"Microsoft.ServiceBus.Messaging",
"fields":[{"name":"SequenceNumber","type":"long"},
{"name":"Offset","type":"string"},
{"name":"EnqueuedTimeUtc","type":"string"},
{"name":"SystemProperties","type":{"type":"map","values":["long","double","string","bytes"]}},
{"name":"Properties","type":{"type":"map","values":["long","double","string","bytes"]}},
{"name":"Body","type":["null","bytes"]}]}
�^|�Q�w���9�}�����1922536(9/14/2016 6:40:50 PM�{"Temperature":"37.0","Humidity":"0.4"}
�^|�Q�w���9�}�����1922672(9/14/2016 6:40:50 PM�{"Temperature":"37.0","Humidity":"0.4"}
�^|�Q�w���9�}�����1922808(9/14/2016 6:40:50 PM�{"Temperature":"37.0","Humidity":"0.4"}
�^|�Q�w���9�}�����1922944(9/14/2016 6:40:51 PM�{"Temperature":"37.0","Humidity":"0.4"}
�^|�Q�w���9�}�����1923080(9/14/2016 6:40:51 PM�{"Temperature":"37.0","Humidity":"0.4"}
�^|�Q�w���9�}��
Even if that does work, I was concerned about the 10,000 blob limit documented here: https://azure.microsoft.com/en-us/documentation/articles/functions-bindings-storage/
In a 24 hour period @ 1 min archive intervals we are already at 1,400 blobs. The recommendation is then to use a queue trigger. However I don’t see any way to use Event Hubs with a queue trigger in this way.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Woohoo!
Batch support for Node EventHub trigger functions has been added in https://github.com/Azure/azure-webjobs-sdk-script/commit/53977df26cbaab9765ae1d107b3460d41ae52c38.