Need to use ReferenceCountUtil.retain(msg) to make sure it is not released once decode returns.