Merge pull request #44 from pragnagopa/cardinality

Add support to specify Cadinality on the EventHubTrigger
This commit is contained in:
Pragna Gopa 2018-08-13 09:16:14 -07:00 коммит произвёл GitHub
Родитель a8828c96fb 8049aabaf2
Коммит 6323172659
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 31 добавлений и 0 удалений

Просмотреть файл

@ -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.