Skip to content

Commit 324ea3f

Browse files
authored
Additional Annotations for Kafka Trigger and Output Binding (#200)
* Adding annotations for Kafka trigger and output * Correcting case for lingerMs * Adding avroschema annotation for kafka output * Correcting Avro Schema description for output
1 parent 2387b6b commit 324ea3f

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,46 @@
190190
* @return The ssl key password.
191191
*/
192192
String sslKeyPassword() default "";
193+
194+
/**
195+
* linger.MS property provides the time between batches of messages
196+
* being sent to cluster. Larger value allows more batching that
197+
* results in high throughput.
198+
*
199+
* @return value of linger.ms property.
200+
*/
201+
int lingerMs() default 5;
202+
203+
/**
204+
* Avro schema for generic record serialization
205+
* default ""
206+
*
207+
* @return the avro schema
208+
*/
209+
String avroSchema() default "";
210+
211+
/**
212+
* URL for the Avro Schema Registry
213+
* default ""
214+
*
215+
* @return the avro schema registry url
216+
*/
217+
String schemaRegistryUrl() default "";
218+
219+
/**
220+
* Username for the Avro Schema Registry
221+
* default ""
222+
*
223+
* @return the avro schema registry username
224+
*/
225+
String schemaRegistryUsername() default "";
226+
227+
/**
228+
* Password for the Avro Schema Registry
229+
* default ""
230+
*
231+
* @return the avro schema registry password
232+
*/
233+
String schemaRegistryPassword() default "";
234+
193235
}

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,35 @@
181181
* @return the avro schema
182182
*/
183183
String avroSchema() default "";
184+
185+
/***
186+
*
187+
* @return
188+
*/
189+
int lagThreshold() default 1000;
190+
191+
/**
192+
* URL for the Avro Schema Registry
193+
* default ""
194+
*
195+
* @return the avro schema registry url
196+
*/
197+
String schemaRegistryUrl() default "";
198+
199+
/**
200+
* Username for the Avro Schema Registry
201+
* default ""
202+
*
203+
* @return the avro schema registry username
204+
*/
205+
String schemaRegistryUsername() default "";
206+
207+
/**
208+
* Password for the Avro Schema Registry
209+
* default ""
210+
*
211+
* @return the avro schema registry password
212+
*/
213+
String schemaRegistryPassword() default "";
214+
184215
}

0 commit comments

Comments
 (0)