Skip to content

Event Hub Service

Summary

Interface to communicate with Azure Event Hub

Operations

Name Tag Summary
eventhub.send() Eventhub Send data to event hub.

Configuration parameters

Name Type Description
config_params [ object ] Event Hub Configurations
config_params[].id ^[0-9A-Za-z]([-.0-9A-Z_a-z]*[0-9A-Za-z])?$ This defines the id to associate the namespace/event_hub/sas_key/sas_key_name such that it can be used directly from Lua script when sending data to Event Hub.
config_params[].sas_key string The SAS Key with 'send' privilege for the given event_hub.
config_params[].event_hub ^[0-9A-Za-z]([-.0-9A-Z_a-z]*[0-9A-Za-z])?$ This specifies the default Event Hub to which data will be sent.
config_params[].namespace ^[0-9A-Za-z]([-0-9A-Za-z]*[0-9A-Za-z])?$ This specifies the Event Hub namespace the given event_hub belongs to.
config_params[].sas_key_name ^[0-9A-Za-z]([-.0-9A-Z_a-z]*[0-9A-Za-z])?$ The associated SAS Key name for the given sas_key.

Operations

send

Description

Send data to event hub.

Arguments

Name Type Description
id ^[0-9A-Za-z]([-.0-9A-Z_a-z]*[0-9A-Za-z])?$ The corresponding namespace/eventhub/sas_key_name/sas_key for this id will be used for sending data. The given id should be defined in service configuration in advance.
event_hub ^[0-9A-Za-z]([-.0-9A-Z_a-z]*[0-9A-Za-z])?$ This specifies the Event Hub the event data will be sent to. If this is given, the event_hub associated with the id will be ignored.
publisher ^[0-9A-Za-z]([-.0-9A-Z_a-z]*[0-9A-Za-z])?$ This specifies the publisher name when sending data.
event_data string The event data to be sent to Event Hub.

Responses

  • Returns {object} when The result of sending data to event hub.

    The response of sending data to event hub. {object}

    Name Type Description
    body string The body of response
    headers object The headers of response
    status_code integer The status code of response
  • Returns nil for Required parameters are not valid or not provided

  • Returns nil for Timeout sending request to Azure Event Hub service

Example

Eventhub.send({
  id = 1,
  event_hub="hub1",
  event_data="{\"status\":\"ok\"}"
})

Last update: December 7, 2021
Back to top