If only channels with protocol Msgpack are counted, the initialization of `packer` could be done after the foreach.