-
Notifications
You must be signed in to change notification settings - Fork 45
Add comment for the release #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2aab522
Add comment for the release
TsuyoshiUshio ba3f3f1
Fit the context to the Kfaka
TsuyoshiUshio efd27fb
fix ci fails
TsuyoshiUshio 3a41a84
update version and fix the grammar
TsuyoshiUshio d1d41fd
apply the same change to the KafkaTrigger
TsuyoshiUshio d033b27
add new line for commenting
TsuyoshiUshio b098c74
nit
TsuyoshiUshio 5761d30
update comment for POJO. Pojo is available only for cardinality.one n…
TsuyoshiUshio 3648b89
update the sentense to understand more
TsuyoshiUshio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,11 +16,42 @@ | |
|
|
||
|
|
||
| /** | ||
| * <p>Annotation for KafkaTrigger bindings</p> | ||
| * <p> | ||
| * Place this on a parameter whose value would come from Kafka, and causing the method to run | ||
| * when Kafka event is consumed. The parameter type can be one of the following: | ||
| * </p> | ||
| * | ||
| * <ul> | ||
| * <li>Any native Java types such as int, String, byte[]</li> | ||
| * <li>Nullable values using Optional<T></li> | ||
| * <li>Any POJO type, currently supported only for Cardinality.One</li> | ||
| * </ul> | ||
| * | ||
| * <p> | ||
| * The following example shows a Java function that is invoked when messages are consumed with | ||
| * the specified topic, brokerList, and consumerGroup on a Kafka cluster. | ||
| * </p> | ||
| * | ||
| * <pre> | ||
| * {@literal @}FunctionName("KafkaTrigger-Java") | ||
| * public void run( | ||
| * {@literal @}KafkaTrigger(name = "kafkaTrigger", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we define datatype? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. dataType has default value. :) |
||
| * topic = "users", | ||
| * brokerList="broker:29092", | ||
| * consumerGroup="functions") | ||
| * List<Map<String, String>> kafkaEventData, | ||
| * final ExecutionContext context | ||
| * ) { | ||
| * context.getLogger().info(kafkaEventData); | ||
| * } | ||
| * </pre> | ||
| * | ||
| * @since 1.4.0 | ||
| */ | ||
| @Target(ElementType.PARAMETER) | ||
| @Retention(RetentionPolicy.RUNTIME) | ||
| public @interface KafkaTrigger { | ||
|
|
||
| /** | ||
| * The variable name used in function code for the request or request body. | ||
| * | ||
|
|
@@ -29,49 +60,65 @@ | |
| String name(); | ||
amamounelsayed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * Gets the Topic. | ||
| * Defines the Topic. | ||
| * | ||
| * @return The topic. | ||
| */ | ||
| String topic(); | ||
|
|
||
| /** | ||
| * Gets or sets the BrokerList. | ||
| * Defines the BrokerList. | ||
| * | ||
| * @return The brokerList. | ||
| */ | ||
| String brokerList(); | ||
|
|
||
| /** | ||
| * Gets or sets the EventHub connection string when using KafkaOutput protocol header feature of Azure EventHubs. | ||
| * Defines the EventHub connection string when using KafkaOutput protocol header feature of Azure EventHubs. | ||
| * | ||
| * @return The EventHub connection string. | ||
| */ | ||
| String eventHubConnectionString() default ""; | ||
| /** | ||
| * 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' | ||
| * | ||
| * @return The cardinality. | ||
| */ | ||
| Cardinality cardinality() default Cardinality.ONE; | ||
|
|
||
| /** | ||
| * DataType for the Cardinality settings. If you set the cardinality as Cardinality.MANY, Azure Functions Host will deserialize | ||
| * the kafka events as an array of this type. | ||
| * Allowed values: string, binary, stream | ||
| * Default: "" | ||
| * <p>Defines how Functions runtime should treat the parameter value. Possible values are:</p> | ||
| * <ul> | ||
| * <li>"": get the value as a string, and try to deserialize to actual parameter type like POJO</li> | ||
| * <li>string: always get the value as a string</li> | ||
| * <li>binary: get the value as a binary data, and try to deserialize to actual parameter type byte[]</li> | ||
| * </ul> | ||
| * @return The dataType which will be used by the Functions runtime. | ||
| */ | ||
| String dataType() default ""; | ||
|
|
||
| /** | ||
| * Gets or sets the consumer group. | ||
| * Defines the consumer group. | ||
| */ | ||
| String consumerGroup(); | ||
|
|
||
| /** | ||
| * SASL mechanism to use for authentication. | ||
| * Allowed values: Gssapi, Plain, ScramSha256, ScramSha512 | ||
| * Default: PLAIN | ||
| * | ||
| * @return The broker authentication mode. | ||
| */ | ||
| BrokerAuthenticationMode authenticationMode() default BrokerAuthenticationMode.NOTSET; | ||
|
|
||
| /** | ||
| * SASL username with the PLAIN and SASL-SCRAM-.. mechanisms | ||
| * Default: "" | ||
| * | ||
| * @return The SASL username. | ||
| */ | ||
| String username() default ""; | ||
|
|
||
|
|
@@ -80,37 +127,49 @@ | |
| * Default: "" | ||
| * | ||
| * security.protocol in librdkafka | ||
| * | ||
| * @return The SASL password. | ||
| */ | ||
| String password() default ""; | ||
|
|
||
| /** | ||
| * Gets or sets the security protocol used to communicate with brokers | ||
| * Defines the security protocol used to communicate with brokers | ||
| * default is PLAINTEXT | ||
| * | ||
| * @return The security protocol. | ||
| */ | ||
| BrokerProtocol protocol() default BrokerProtocol.NOTSET; | ||
|
|
||
| /** | ||
| * Path to client's private key (PEM) used for authentication. | ||
| * Default "" | ||
| * ssl.key.location in librdkafka | ||
| * | ||
| * @return The ssl key location. | ||
| */ | ||
| String sslKeyLocation() default ""; | ||
|
|
||
| /** | ||
| /** | ||
| * Path to CA certificate file for verifying the broker's certificate. | ||
| * ssl.ca.location in librdkafka | ||
| * | ||
| * @return The path to CA certificate file. | ||
| */ | ||
| String sslCaLocation() default ""; | ||
|
|
||
| /** | ||
| * Path to client's certificate. | ||
| * ssl.certificate.location in librdkafka | ||
| * | ||
| * @return The ssl certificate location. | ||
| */ | ||
| String sslCertificateLocation() default ""; | ||
|
|
||
| /** | ||
| * Password for client's certificate. | ||
| * ssl.key.password in librdkafka | ||
| * | ||
| * @return The ssl key password. | ||
| */ | ||
| String sslKeyPassword() default ""; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.