@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface ServiceBusQueueTrigger
Place this on a parameter whose value would come from a Service Bus queue, and causing the method to run when a new item is pushed. The parameter type can be one of the following:
The following example shows a Java function that logs a Service Bus queue message:
@FunctionName("serviceBusMonitor")
public void logServiceBusMessage(
@ServiceBusQueueTrigger(name = "msg", queueName = "myqueue", connection = "AzureServiceBusConnection")
final String message,
final ExecutionContext context
) {
context.getLogger().info("Message is received: " + message);
}
| Modifier and Type | Required Element and Description |
|---|---|
String |
connection
Defines the app setting name that contains the Service Bus connection string.
|
String |
name
The variable name used in function.json.
|
String |
queueName
Defines the name of the Service Bus queue to which to bind.
|
| Modifier and Type | Optional Element and Description |
|---|---|
AccessRights |
access
Defines the permission of the Service Bus queue to which to bind.
|
Cardinality |
cardinality
Cardinality of the trigger input.
|
String |
dataType
Defines how Functions runtime should treat the parameter value.
|
boolean |
isSessionsEnabled
Defines the value indicating whether the sessions are enabled.
|
public abstract String name
public abstract String queueName
public abstract String connection
public abstract String dataType
Defines how Functions runtime should treat the parameter value. Possible values are:
public abstract AccessRights access
public abstract boolean isSessionsEnabled
public abstract Cardinality cardinality
Cardinality value representing the CardinalityCopyright © 2022. All rights reserved.