// Why doesn't this ChannelException work.
// throw body.getChannelException(AMQConstant.INVALID_ARGUMENT, ise.getMessage());
// AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
// TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
// Be aware of possible changes to parameter order as versions change.
session.writeFrame(ChannelCloseBody.createAMQFrame(channelId,
(byte) 8, (byte) 0, // AMQP version (major, minor)
BasicConsumeBody.getClazz((byte) 8, (byte) 0), // classId
BasicConsumeBody.getMethod((byte) 8, (byte) 0), // methodId
AMQConstant.INVALID_ARGUMENT.getCode(), // replyCode
new AMQShortString(ise.getMessage()))); // replyText