From 0cc672dfe87b793c4942a2bef04528dd8e9635dd Mon Sep 17 00:00:00 2001
From: Arnab Nandy
Date: Sat, 8 Aug 2026 21:36:34 +0530
Subject: [PATCH] Document concrete types for batch trigger metadata
Signed-off-by: Arnab Nandy
---
README.md | 5 +++++
.../microsoft/azure/functions/annotation/BindingName.java | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/README.md b/README.md
index 4037c6c..71daee6 100644
--- a/README.md
+++ b/README.md
@@ -226,6 +226,11 @@ public class Function {
}
```
+For trigger metadata containing a batch of values, use a concrete array or collection type that
+matches the metadata. For example, a Kafka trigger with `cardinality = Cardinality.MANY` can bind
+topics as `@BindingName("TopicArray") String[] topics` and offsets as
+`@BindingName("OffsetArray") long[] offsets`. `Object[]` is not supported for collection metadata.
+
### License
This project is under the benevolent umbrella of the [.NET Foundation](http://www.dotnetfoundation.org/) and is licensed under the MIT License.
diff --git a/src/main/java/com/microsoft/azure/functions/annotation/BindingName.java b/src/main/java/com/microsoft/azure/functions/annotation/BindingName.java
index da3812f..c7b68a3 100644
--- a/src/main/java/com/microsoft/azure/functions/annotation/BindingName.java
+++ b/src/main/java/com/microsoft/azure/functions/annotation/BindingName.java
@@ -18,6 +18,14 @@
* bindings in function.json manually.
*
*
+ *
+ * For batch trigger metadata, use an array or collection whose element type matches the metadata
+ * value. For example, Kafka metadata can be bound with
+ * {@code @BindingName("TopicArray") String[] topics} and
+ * {@code @BindingName("OffsetArray") long[] offsets}. {@code Object[]} is not supported for
+ * collection metadata.
+ *
+ *
* @since 1.0.0
*/
@Target(ElementType.PARAMETER)