none
Consuming different data types from EventHub RRS feed

  • Question

  • Hi, 

    I've  only started with ASA, so far have more questions than answers... 
    Here is the problem I am trying to figure out:
    My application sends two different data types to a single eventhub, for simplcity lets call the types "Temperature readings" and "Pressure readings"

    EventData.Properties.Add ("Pressure readings.")
    Send(EventData)
    EventData.Properties.Add ("Temp. readings.")
    Send(EventData)
    On the receiving end I read those properties, deserialize JSON to the proper data type and store to different Azure tables. 

    Now I need to hook up Stream Analytics and process those different data types in a different manner... 
    Do I get it right that ASA can't distinguish types in a single EventHub? 
    What would be the best option then? Do I set up a separate event hub for each data type? 

    Thank you very much!

     



    • Edited by fly2 Wednesday, October 5, 2016 2:37 AM
    Wednesday, October 5, 2016 2:08 AM

Answers

  • You have a couple of options, you can:

    • As you yourself say, set up a second hub - probably overkill
    • In you packets you can have a field indicating the type it is; e.g. "packetType": and then have different values for Pressure and temp. You in your ASA query you filter on the packet type.

    Hope this helps!

    Niels


    http://www.nielsberglund.com | @nielsberglund

    • Marked as answer by fly2 Thursday, October 6, 2016 2:15 AM
    Wednesday, October 5, 2016 6:42 AM

All replies

  • You have a couple of options, you can:

    • As you yourself say, set up a second hub - probably overkill
    • In you packets you can have a field indicating the type it is; e.g. "packetType": and then have different values for Pressure and temp. You in your ASA query you filter on the packet type.

    Hope this helps!

    Niels


    http://www.nielsberglund.com | @nielsberglund

    • Marked as answer by fly2 Thursday, October 6, 2016 2:15 AM
    Wednesday, October 5, 2016 6:42 AM
  • That worked! Thanks a lot!

    Thursday, October 6, 2016 2:15 AM