다음을 통해 공유


KafkaTrigger Interface

public interface KafkaTrigger

KafkaTrigger(name = "kafkaTrigger", topic = "users", brokerList="broker:29092", consumerGroup="functions") List<Map<String, String>> kafkaEventData, final ExecutionContext context ) { context.getLogger().info(kafkaEventData); }

Method Summary

Modifier and Type Method and Description
BrokerAuthenticationMode authenticationMode()

SASL mechanism to use for authentication. Allowed values: Gssapi, Plain, ScramSha256, ScramSha512 Default: PLAIN

String brokerList()

Defines the BrokerList.

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. If you choose 'Many', please set a dataType. Default: 'One'

String consumerGroup()

Defines the consumer group.

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

Defines the EventHub connection string when using KafkaOutput protocol header feature of Azure EventHubs.

String name()

The variable name used in function code for the request or request body.

String password()

SASL password with the PLAIN and SASL-SCRAM-.. mechanisms Default: ""

security.protocol in librdkafka

BrokerProtocol protocol()

Defines the security protocol used to communicate with brokers default is PLAINTEXT

String sslCaLocation()

Path to CA certificate file for verifying the broker's certificate. ssl.ca.location in librdkafka

String sslCertificateLocation()

Path to client's certificate. ssl.certificate.location in librdkafka

String sslKeyLocation()

Path to client's private key (PEM) used for authentication. Default "" ssl.key.location in librdkafka

String sslKeyPassword()

Password for client's certificate. ssl.key.password in librdkafka

String topic()

Defines the Topic.

String username()

SASL username with the PLAIN and SASL-SCRAM-.. mechanisms Default: ""

Method Details

authenticationMode

public BrokerAuthenticationMode authenticationMode() default BrokerAuthenticationMode.NOTSET

SASL mechanism to use for authentication. Allowed values: Gssapi, Plain, ScramSha256, ScramSha512 Default: PLAIN

Returns:

The broker authentication mode.

brokerList

public String brokerList()

Defines the BrokerList.

Returns:

The brokerList.

cardinality

public Cardinality cardinality() default Cardinality.ONE

Cardinality of the trigger input. Choose 'One' if the input is a single message or 'Many' if the input is an array of messages. If you choose 'Many', please set a dataType. Default: 'One'

Returns:

The cardinality.

consumerGroup

public String consumerGroup()

Defines the consumer group.

Returns:

The consumer group.

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.

eventHubConnectionString

public String eventHubConnectionString() default ""

Defines the EventHub connection string when using KafkaOutput protocol header feature of Azure EventHubs.

Returns:

The EventHub connection string.

name

public String name()

The variable name used in function code for the request or request body.

Returns:

The variable name used in function code for the request or request body.

password

public String password() default ""

SASL password with the PLAIN and SASL-SCRAM-.. mechanisms Default: ""

security.protocol in librdkafka

Returns:

The SASL password.

protocol

public BrokerProtocol protocol() default BrokerProtocol.NOTSET

Defines the security protocol used to communicate with brokers default is PLAINTEXT

Returns:

The security protocol.

sslCaLocation

public String sslCaLocation() default ""

Path to CA certificate file for verifying the broker's certificate. ssl.ca.location in librdkafka

Returns:

The path to CA certificate file.

sslCertificateLocation

public String sslCertificateLocation() default ""

Path to client's certificate. ssl.certificate.location in librdkafka

Returns:

The ssl certificate location.

sslKeyLocation

public String sslKeyLocation() default ""

Path to client's private key (PEM) used for authentication. Default "" ssl.key.location in librdkafka

Returns:

The ssl key location.

sslKeyPassword

public String sslKeyPassword() default ""

Password for client's certificate. ssl.key.password in librdkafka

Returns:

The ssl key password.

topic

public String topic()

Defines the Topic.

Returns:

The topic.

username

public String username() default ""

SASL username with the PLAIN and SASL-SCRAM-.. mechanisms Default: ""

Returns:

The SASL username.

Applies to