Subject: | Integers in header values are not preserved |
Integers in header values are converted to strings. It seems that the logic AnyEvent::RabbitMQ::Channel::_header() is wrong and actually does _not_ preserve integer values.
I wonder if the protection code in _header() is necessary at all and whether values should be passed unchanged here. Net::AMQP handles integers itself (see _pack_field_value in Net::AMQP::Common). There would be a difference for references, which would not be stringified but would throw an error instead. A possibly problematic difference would be for objects with a stringification method (for example DateTime) --- Net::AMQP would die here instead of trying the stringification.