다음을 통해 공유


ServiceBusQueueTrigger Interface

public interface ServiceBusQueueTrigger

ServiceBusQueueTrigger(name = "msg", queueName = "myqueue", connection = "AzureServiceBusConnection") final String message, final ExecutionContext context ) { context.getLogger().info("Message is received: " + message); }

Method Summary

Modifier and Type Method and Description
AccessRights access()

Defines the permission of the Service Bus queue to which to bind.

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. 'ONE' is the default if unspecified

String connection()

Defines the app setting name that contains the Service Bus connection string.

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>
    

boolean isSessionsEnabled()

Defines the value indicating whether the sessions are enabled.

String name()

The variable name used in function.json.

String queueName()

Defines the name of the Service Bus queue to which to bind.

Method Details

access

public AccessRights access() default AccessRights.MANAGE

Defines the permission of the Service Bus queue to which to bind.

Returns:

The Service Bus queue permission.

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. 'ONE' is the default if unspecified

Returns:

An Cardinality value representing the Cardinality

connection

public String connection()

Defines the app setting name that contains the Service Bus connection string.

Returns:

The app setting name of the connection 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.

isSessionsEnabled

public boolean isSessionsEnabled() default false

Defines the value indicating whether the sessions are enabled.

Returns:

The value indicating whether the sessions are enabled.

name

public String name()

The variable name used in function.json.

Returns:

The variable name used in function.json.

queueName

public String queueName()

Defines the name of the Service Bus queue to which to bind.

Returns:

The Service Bus queue string.

Applies to