no output from query RRS feed

  • Question

  • Hi

    I have changed the partition key of the messages I am sending to an eventhub which the following query reads from. And it is now not returning any results. Any ideas:

    MeasurementTime that I timestamp by is about 4 months older than today but it was not a problem before

    SELECT CustomerId as CustomerId, 
           DeviceId as DeviceId,
           CONCAT('DoorFault ', DeviceId)  as EventId,
           SensorId as SensorId,
           '1' as EventSeverity,
           MAX(CAST(SensorValue as bigint)) as EventCount, 
           SensorType as EventDescription, 
           Max(MeasurementTime) as EventTime
    FROM inputeventhub
    TIMESTAMP BY MeasurementTime
    PARTITION BY PartitionId
    WHERE CustomerId = 'sp' 
    GROUP BY DeviceId, CustomerId, SensorId, SensorType, TumblingWindow(second, 10) 

    Friday, January 9, 2015 1:48 PM


  • Yes, reading from a specific EH partition is not supported.

    Zafar Abbas

    • Proposed as answer by Zafar Abbas Thursday, February 5, 2015 5:01 PM
    • Marked as answer by Janet Yeilding Friday, February 6, 2015 5:13 PM
    Thursday, February 5, 2015 5:01 PM

All replies

  • Getting these error messages. Do'nt know if they are related.

    Correlation ID:

    e9b38fb8-a360-4bf9-9180-c7af6d58d931 Error: A receiver with epoch '-1' already exists. A new receiver with epoch null cannot be created. TrackingId:6a284197-779f-4a95-8a1f-93e83505768e_B10,TimeStamp:1/9/2015 1:39:35 PM TrackingId:3775651e-c72b-4bae-93be-fb67f3efe48d_B10, Reference:ee80dbae-4607-46b3-9c24-c98345f40bb8, Timestamp:1/9/2015 1:39:36 PM Message: The Event Hub is configured to only allow one event receiver at a given time and an existing receiver is already connected to this Event Hub Message Time: 2015-01-09 13:39:36Z Microsoft.Resources/EventNameV2: sharedNode92F920DE-290E-4B4C-861A-F85A4EC01D82.inputeventhub_0_c76f7247_25b7_4ca6_a3b6_c7bf192ba44a#8.output Microsoft.Resources/Operation: Receive Events Microsoft.Resources/ResourceUri: /subscriptions/ca13447b-d3cb-46f2-88a7-6b2d071fa5f1/resourceGroups/StreamAnalytics-Default-West-Europe/providers/Microsoft.StreamAnalytics/streamingjobs/sporveienalarms Type: EventHubInputAdapterEventHubFailure

    • Edited by Gökhan Kurt Friday, January 9, 2015 2:05 PM change
    Friday, January 9, 2015 2:04 PM
  • According to the error message, there is already a receiver with epoch value -1, so you cannot create another receiver with null epoch value. There are options:

    1. When you create the first receiver, don't specify epoch value, then you can create up to 5 receivers.

    2. Create a receiver with epoch value greater than -1, then the new one will be created and old one destroyed.

    This link gives good explanation:




    • Proposed as answer by Zafar Abbas Monday, January 12, 2015 2:36 AM
    • Unproposed as answer by Gökhan Kurt Friday, January 16, 2015 2:43 AM
    Friday, January 9, 2015 5:20 PM
  • I am actually accessing the eventhub through a stream analytics query and not defining myself any epoches.
    Monday, January 12, 2015 11:38 AM
  • Do you  have multiple Stream Analytics jobs reading from the same Event Hub?

    Zafar Abbas

    Saturday, January 24, 2015 2:23 AM
  • Yes actually I have that. Do you think that it is a problem?
    Tuesday, January 27, 2015 10:51 AM
  • Most likely Stream Analytics is not defining epoch.

    "When an Event Hub is specified as an input, Stream Analytics jobs will use the Default Consumer Group to ingest data from the Event Hub. Doing so without additional configuration means that no other receivers can access the Event Hub. To enable an Event Hub to have more than one receiver, additional consumer groups must be configured. For details, see Event Hubs developer guide."


    Tuesday, January 27, 2015 4:21 PM
  • We are aware of this limitation and working on a way to have the user specify consumer groups when configuring EventHub as input for a Stream Analytics jobs. It should be available in a future update. We will keep you posted when it is available. For now, you will have to restrict the number of receivers of your EventHub.


    Zafar Abbas

    Tuesday, January 27, 2015 5:31 PM
  • Ok. I understand.

    If I could somehow specify which PartitionId the input to Stream Analytics query was it could also solve my problem. But I guess that is not an option either.

    Wednesday, January 28, 2015 7:35 AM
  • Yes, reading from a specific EH partition is not supported.

    Zafar Abbas

    • Proposed as answer by Zafar Abbas Thursday, February 5, 2015 5:01 PM
    • Marked as answer by Janet Yeilding Friday, February 6, 2015 5:13 PM
    Thursday, February 5, 2015 5:01 PM
  • Update on this: Using REST APIs you can now specify a Consumer Group to use when reading from Event Hub. Associating a Stream Analytics job with its own Consumer Group enables your job to have its own view over the input stream, independent of other event readers. A Consumer Group is specified via the optional property consumerGroupName in the Create Input request and will be surfaced in the portal in a future update.

    Thanks to folks on this thread for letting us know that this feature is important.

    Saturday, February 21, 2015 12:27 AM