You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a detailed example of using EventHubTrigger
>NOTE: this is a duplicate of PR #97567. Moved here as I'm internal.
This example provides a clear example and details on using Bindings of EventHubTrigger in Java -- any more details are here and please advise on what else to add: https://github.com/cicorias/azfunct-java-eventhubs
Copy file name to clipboardExpand all lines: includes/functions-bindings-event-hubs-trigger.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,6 +287,65 @@ public void eventHubProcessor(
287
287
In the [Java functions runtime library](/java/api/overview/azure/functions/runtime), use the `EventHubTrigger` annotation on parameters whose value comes from the event hub. Parameters with these annotations cause the function to run when an event arrives. This annotation can be used with native Java types, POJOs, or nullable values using `Optional<T>`.
288
288
289
289
::: zone-end
290
+
291
+
::: zone pivot="programming-language-java"
292
+
293
+
The following example illustrates extensive use of `SystemProperties` and other Binding options for further introspection of the Event along with providing a well-formed `BlobOutput` path that is Date hierarchical.
294
+
295
+
```java
296
+
packagecom.example;
297
+
importjava.util.Map;
298
+
importjava.time.ZonedDateTime;
299
+
300
+
importcom.microsoft.azure.functions.annotation.*;
301
+
importcom.microsoft.azure.functions.*;
302
+
303
+
/**
304
+
* Azure Functions with Event Hub trigger.
305
+
* and Blob Output using date in path along with sequenct and partition ID
0 commit comments