Skip to content

Commit 65e251a

Browse files
Add Kafka Trigger and Output (#118)
* Adding Kafka Trigger * Add methods for windows support * remove CustomBindings * Add tools-common for build and ci * adding datatype and name for the rigger and output for passing test
1 parent b12f2d4 commit 65e251a

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

mvnBuildFunctionPluginsSkipTests.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mvn clean install -pl build-tools,azure-maven-plugins-pom,azure-maven-plugin-lib,azure-functions-maven-plugin -Dmaven.javadoc.skip=true -Dmaven.test.skip -U -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B
1+
mvn clean install -pl build-tools,azure-maven-plugins-pom,azure-tools-common,azure-maven-plugin-lib,azure-functions-maven-plugin -Dmaven.javadoc.skip=true -Dmaven.test.skip -U -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B

src/main/java/com/microsoft/azure/functions/annotation/KafkaOutput.java

+16
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@
1919
@Target(ElementType.PARAMETER)
2020
@Retention(RetentionPolicy.RUNTIME)
2121
public @interface KafkaOutput {
22+
/**
23+
* The variable name used in function.json.
24+
* @return The variable name used in function.json.
25+
*/
26+
String name();
27+
28+
/**
29+
* <p>Defines how Functions runtime should treat the parameter value. Possible values are:</p>
30+
* <ul>
31+
* <li>"" or string: treat it as a string whose value is serialized from the parameter</li>
32+
* <li>binary: treat it as a binary data whose value comes from for example OutputBinding&lt;byte[]&gt;</li>
33+
* </ul>
34+
* @return The dataType which will be used by the Functions runtime.
35+
*/
36+
String dataType() default "";
37+
2238
/**
2339
* Gets the Topic.
2440
* @return

src/main/java/com/microsoft/azure/functions/annotation/KafkaTrigger.java

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
@Target(ElementType.PARAMETER)
2222
@Retention(RetentionPolicy.RUNTIME)
2323
public @interface KafkaTrigger {
24+
/**
25+
* The variable name used in function code for the request or request body.
26+
*
27+
* @return The variable name used in function code for the request or request body.
28+
*/
29+
String name();
30+
2431
/**
2532
* Gets the Topic.
2633
*/

0 commit comments

Comments
 (0)