my $s = YAML::Dump($params); print "pack length " . length($s) . "\n"; my $packed_data = pack("N/aN/a", $s, $in); $conn->publish($channel, "rpc.$function", $packed_data, { exchange => $exchange_name }, { content_type => $type, correlation_id => $uuid_str, reply_to => $queue_name, });