EventHubTrigger Interface

public interface EventHubTrigger

EventHubTrigger(name = "event", eventHubName = "samples-workitems", connection = "AzureEventHubConnection") String message, final ExecutionContext context ) { context.getLogger().info("Event hub message received: " + message); }

Method Summary

Modifier and Type Method and Description
Cardinality cardinality()

Cardinality of the trigger input. Choose 'One' if the input is a single message or 'Many' if the input is an array of messages. 'Many' is the default if unspecified

String connection()

Defines the app setting name that contains the Azure Eventhub connection string.

String consumerGroup()

Defines the consumer group of the event hub to which to bind.

String dataType()

Defines how Functions runtime should treat the parameter value. Possible values are:

    <li>
    
      <p>"": get the value as a string, and try to deserialize to actual parameter type like POJO </p>
    
    </li>
    
    <li>
    
      <p>string: always get the value as a string </p>
    
    </li>
    
    <li>
    
      <p>binary: get the value as a binary data, and try to deserialize to actual parameter type byte[] </p>
    
    </li>
    

String eventHubName()

Defines the name of the event hub to which to bind.

String name()

The variable name used in function.json.

Method Details

cardinality

public Cardinality cardinality() default Cardinality.MANY

Cardinality of the trigger input. Choose 'One' if the input is a single message or 'Many' if the input is an array of messages. 'Many' is the default if unspecified

Returns:

An Cardinality value representing the Cardinality

connection

public String connection()

Defines the app setting name that contains the Azure Eventhub connection string.

Returns:

The app setting name of the connection string.

consumerGroup

public String consumerGroup() default "$Default"

Defines the consumer group of the event hub to which to bind.

Returns:

The event hub consumer group string.

dataType

public String dataType() default ""

Defines how Functions runtime should treat the parameter value. Possible values are:

    <li>
    
      <p>"": get the value as a string, and try to deserialize to actual parameter type like POJO </p>
    
    </li>
    
    <li>
    
      <p>string: always get the value as a string </p>
    
    </li>
    
    <li>
    
      <p>binary: get the value as a binary data, and try to deserialize to actual parameter type byte[] </p>
    
    </li>
    

Returns:

The dataType which will be used by the Functions runtime.

eventHubName

public String eventHubName()

Defines the name of the event hub to which to bind.

Returns:

The event hub name string.

name

public String name()

The variable name used in function.json.

Returns:

The variable name used in function.json.

Applies to