Repository: Azure/azure-functions-java-worker (java)

Issue:
Allow EventData[] POJO for Event Hubs batch
A few older issues that are closed now that *may* be related, but to avoid confusion just capturing this ask.  

If you set cardinality to many, you can only today use `string[]` as the type of the trigger, which sends an array of the Event Hub messages (`EventData.Body`).  However that means you lose a lot of important information on the event, like the system and user properties.

I believe there should be a way to preserve the binding properties and send in a POJO without having to go all the way to "live objects." 

Pull request:
Update to Version to 1.3.0
Udpate event hub test to bind to systemproperties array

Fixes #275 

Patch:
diff --git a/pom.xml b/pom.xml
index 353557f..7c642ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>com.microsoft.azure.functions</groupId>
 	<artifactId>azure-functions-java-worker</artifactId>
-	<version>1.3.1-SNAPSHOT</version>
+	<version>1.3.1</version>
 	<packaging>jar</packaging>
 	<parent>
 		<groupId>com.microsoft.maven</groupId>
@@ -22,7 +22,7 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<azure.functions.java.library.version>1.3.0-SNAPSHOT</azure.functions.java.library.version>
+		<azure.functions.java.library.version>1.3.0</azure.functions.java.library.version>
 	</properties>
 
 	<licenses>


Test patch:
diff --git a/endtoendtests/pom.xml b/endtoendtests/pom.xml
index a8a816d..0375f2b 100644
--- a/endtoendtests/pom.xml
+++ b/endtoendtests/pom.xml
@@ -15,8 +15,8 @@
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<maven.compiler.source>1.8</maven.compiler.source>
 		<maven.compiler.target>1.8</maven.compiler.target>
-		<azure.functions.maven.plugin.version>1.2.0</azure.functions.maven.plugin.version>
-		<azure.functions.java.library.version>1.2.0</azure.functions.java.library.version>
+		<azure.functions.maven.plugin.version>1.2.2</azure.functions.maven.plugin.version>
+		<azure.functions.java.library.version>1.3.0</azure.functions.java.library.version>
 		<functionAppName>azure-functions-java-endtoendtests</functionAppName>
 		<functionAppRegion>westus</functionAppRegion>
 		<functionResourceGroup>java-functions-group</functionResourceGroup>
diff --git a/endtoendtests/src/main/java/com/microsoft/azure/functions/endtoend/EventHubTriggerTests.java b/endtoendtests/src/main/java/com/microsoft/azure/functions/endtoend/EventHubTriggerTests.java
index 81c6046..a2e9efd 100644
--- a/endtoendtests/src/main/java/com/microsoft/azure/functions/endtoend/EventHubTriggerTests.java
+++ b/endtoendtests/src/main/java/com/microsoft/azure/functions/endtoend/EventHubTriggerTests.java
@@ -24,11 +24,14 @@ public class EventHubTriggerTests {
     @FunctionName("EventHubTriggerAndOutputString")
     public void EventHubTriggerAndOutputString(
         @EventHubTrigger(name = "messages", eventHubName = "test-input-java", connection = "AzureWebJobsEventHubSender", dataType = "string", cardinality = Cardinality.MANY) String[] messages,
+        @BindingName("SystemPropertiesArray") SystemProperty[] systemPropertiesArray,
         @EventHubOutput(name = "output", eventHubName = "test-output-java", connection = "AzureWebJobsEventHubSender") OutputBinding<String> output,
         final ExecutionContext context
     ) {
         context.getLogger().info("Java Event Hub trigger received " + messages.length +" messages");
+        context.getLogger().info("SystemProperties for message[0]: EnqueuedTimeUtc=" + systemPropertiesArray[0].EnqueuedTimeUtc +" Offset=" +systemPropertiesArray[0].Offset);
         output.setValue(messages[0]);
+        
     }
 
     @FunctionName("EventHubTriggerCardinalityOne")
@@ -74,5 +77,11 @@ public class EventHubTriggerTests {
         output.setValue(message);
     }
 
+    public static class SystemProperty {
+      public String SequenceNumber;
+      public String Offset;
+      public String PartitionKey;        
+      public String EnqueuedTimeUtc;
+  }
    
 }