#Event Hubs Trigger

Azure Functions Event Hubs trigger lets you listen on Azure Event Hubs. Full documentation can be found on azure.com.

#Event Hubs Events

#Event Hubs Trigger

This setup specifies that the hello function should be run when a new Event Hubs item appears on the path "hello".

Here's an example:

# serverless.yml

functions:
  example:
    handler: handler.hello
    events:
      - eventHub:
        name: item #<string>, default - "myEventHubMessage", specifies which name is available on `context.bindings`
        path: hello #<string>, specifies the Name of the Event Hub
        consumerGroup: $Default #<string>, default - "$Default", specifies the consumerGroup to listen with
        connection: EventHubsConnection #<string>, App Setting/environment variable which contains Event Hubs Namespace Connection String
// handler.js

'use strict';

module.exports.hello = function (context, item) {
  context.log('Received item: ${item}');
  context.done();
};

Have questions?

Head over to the forums to search for your questions and issues or post a new one.