title: How to retrieve properties of IoT hub data and not only the actual payload
body: <p>I have a <code>iot-hub</code> that receives both JSON and non-json (hex) messages. These all go to my Java function app to decode. Based on the <code>device-id</code> I'm calling a different decoder.</p>
  
  <p>I'm trying to get the actual <code>iothub-connection-device-id</code> of the message I'm receiving.</p>
  
  <pre><code>public class TranslateEndpoint {
      /**
       * This function will be invoked when an event is received from Event Hub.
       */
      @FunctionName("TranslateEndpoint")
      public void run(
          @EventHubTrigger(name = "message", eventHubName = "NAME-DeviceIntegration", connection = "HostName=HOST;SharedAccessKeyName=NAME;SharedAccessKey=KEY=", consumerGroup = "$Default", cardinality = Cardinality.ONE) EventData message,
          final ExecutionContext context
      ) {
          context.getLogger().info("Java Event Hub trigger function executed.");
          context.getLogger().info("Length:" + message.toString());
          TranslateController temp = new TranslateController();
  
          // Build up a list with all the data
  
          context.getLogger().info(message.getSystemProperties().getPublisher());
          context.getLogger().info(message.getSystemProperties().getPartitionKey());
          context.getLogger().info(message.getSystemProperties().get("iothub-connection-device-id").toString());
      }
  </code></pre>
  
  <p>The code above is inspired by some C# code I found. Unfortunately I get an error 
  <code>
  Stack: java.lang.RuntimeException: Unable to invoke no-args constructor for interface com.microsoft.azure.eventhubs.EventData. Registering an InstanceCreator with Gson for this type may fix this problem.
  </code></p>
  
  <p>Before I used a <code>String</code> and only got my actual payload. What is the proper way of receiving system properties of my message?</p>