}
@Override
public EventMessage readAMQPMessage(byte[] messageBody, Map<String, Object> headers) {
try {
EventMessageReader in = new EventMessageReader(new DataInputStream(new ByteArrayInputStream(messageBody)),
serializer);
return in.readEventMessage();
} catch (IOException e) {
// ByteArrayInputStream doesn't throw IOException... anyway...
throw new EventPublicationFailedException("Failed to deserialize an EventMessage", e);
}
}