//only handles responses up to 2^31-1 bytes long
byte[] data = new byte[(int) msg.getBodyLength()];
msg.readBytes(data);
BBDecoder decoder = new BBDecoder();
decoder.init(ByteBuffer.wrap(data));
return (List<T>)decoder.readList();
}
else if (message instanceof MapMessage)
{ /*
* In Qpid version 0.20 instead of exposing amqp/list as a BytesMessage as above rather it is exposed
* as a MapMessage!!??? the Object Keys are the indices into the List. We create a java.util.List