Merge pull request #44 from pragnagopa/cardinality
Add support to specify Cadinality on the EventHubTrigger
This commit is contained in:
Коммит
6323172659
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*/
|
||||
|
||||
package com.microsoft.azure.functions.annotation;
|
||||
|
||||
/**
|
||||
* <p>Cardinality of the EventHubTrigger 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</p>
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public enum Cardinality {
|
||||
/**
|
||||
* To receive a single message, set cardinality to ONE
|
||||
*/
|
||||
ONE,
|
||||
|
||||
/**
|
||||
* To receive events in a batch, set cardinality to MANY. This is the default if omitted.
|
||||
*/
|
||||
MANY
|
||||
}
|
|
@ -59,6 +59,13 @@ public @interface EventHubTrigger {
|
|||
*/
|
||||
String eventHubName();
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @return An {@link Cardinality} value representing the Cardinality
|
||||
*/
|
||||
Cardinality cardinality() default Cardinality.MANY;
|
||||
|
||||
|
||||
/**
|
||||
* Defines the consumer group of the event hub to which to bind.
|
||||
* @return The event hub consumer group string.
|
||||
|
|
Загрузка…
Ссылка в новой задаче