Share via


EventHubTrigger インターフェイス

public interface EventHubTrigger

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

メソッドの概要

修飾子と型 メソッドと説明
Cardinality cardinality()

トリガー入力のカーディナリティ。 入力が 1 つのメッセージの場合は "One" を選択し、入力がメッセージの配列である場合は "多" を選択します。 指定されていない場合、'多' が既定値です

String connection()

Azure Eventhub 接続文字列を含むアプリ設定名を定義します。

String consumerGroup()

バインド先のイベント ハブのコンシューマー グループを定義します。

String dataType()

Functions ランタイムがパラメーター値をどのように扱うかを定義します。 次のいずれかの値になります。

    <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()

バインド先のイベント ハブの名前を定義します。

String name()

function.json で使用される変数名。

メソッドの詳細

cardinality

public Cardinality cardinality() default Cardinality.MANY

トリガー入力のカーディナリティ。 入力が 1 つのメッセージの場合は "One" を選択し、入力がメッセージの配列である場合は "多" を選択します。 指定されていない場合、'多' が既定値です

Returns:

Cardinalityカーディナリティを表す値

connection

public String connection()

Azure Eventhub 接続文字列を含むアプリ設定名を定義します。

Returns:

接続文字列のアプリ設定名。

consumerGroup

public String consumerGroup() default "$Default"

バインド先のイベント ハブのコンシューマー グループを定義します。

Returns:

イベント ハブ コンシューマー グループの文字列。

dataType

public String dataType() default ""

Functions ランタイムがパラメーター値をどのように扱うかを定義します。 次のいずれかの値になります。

    <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:

Functions ランタイムによって使用される dataType。

eventHubName

public String eventHubName()

バインド先のイベント ハブの名前を定義します。

Returns:

イベント ハブ名の文字列。

name

public String name()

function.json で使用される変数名。

Returns:

function.json で使用される変数名。

適用対象