How to get Object from MQTT message payload
<p>On receiving mqtt message I am trying to get Object from payload (byte[])</p>

<pre><code>Object ob = SerializationUtils.deserialize(message.getPayload());
</code></pre>

<p>I am getting:</p>

<pre><code>org.apache.commons.lang.SerializationException: java.io.StreamCorruptedException: invalid stream header: 7B22736E
    at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:168)
    at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:193)
</code></pre>