locked
Is it possible to get the publisher name when consuming an event hub output feed? RRS feed

  • Question

  • Hi, I've been trying for a while to access the publisher name from an event hub feed without much success. We have many devices publishing and we need to report down to the grain of device (submitted as publisher name in the event message metadata).  Regarding querying the event hub output as a consumer... I've been trying to use the eventdata.systemproperties dictionary to find the publisher name of each message but it doesn't seem possible. Is the only way to query the publisher name to add it as a data enrichment step between an API and the event hub so that it is a user defined extended property of each event message?

    Geoff

    Saturday, December 3, 2016 9:02 AM

All replies

  • As an example... for one event message...all I can see in the event data output is the output below. You can see that there's no publisher metadata available. However the Service bus explorer published on GIT hub indicates that the publisher metadata is available: see this link https://github.com/paolosalvatori/ServiceBusExplorer

    {
      "body": {
        "Attribute_1": "Code1",
        "Attribute_2": "Code2",
        "Attribute_3": "ATTENDANCES",
        "Attribute_Value": 85.05,
        "Submission_DateTime": "2016-11-20 17:48:28",
        "Period_DateTime": "2016-11-19 17:48:28"
      },
      "enqueuedTimeUtc": "2016-12-01T16:24:50.441Z",
      "offset": "723824",
      "partitionKey": null,
      "properties": {},
      "sequenceNumber": 2573,
      "serializedSizeInBytes": 216,
      "systemProperties": {
        "x-opt-sequence-number": 2573,
        "x-opt-offset": "723824",
        "x-opt-enqueued-time": "2016-12-01T16:24:50.441Z",
        "EnqueuedTimeUtc": "2016-12-01T16:24:50.441Z",
        "SequenceNumber": 2573,
        "Offset": "723824"
      }
    }


    Geoff

    Saturday, December 3, 2016 9:44 AM