Closed MasterYC closed 1 year ago
123� 3 55555� 5 123� 3 123� 3 ^C this is print
there is a ? ,I do not know why
The message body is not null-terminated. So use this:
std::string str(mes.body(), mes.bodySize());
Or:
std::cout.write(mes.body(), mes.bodySize()) << std::endl;
The message body is not null-terminated. So use this:
std::string str(mes.body(), mes.bodySize());
Or:
std::cout.write(mes.body(), mes.bodySize()) << std::endl;
The message body is not null-terminated. So use this:
std::string str(mes.body(), mes.bodySize());
Or:
std::cout.write(mes.body(), mes.bodySize()) << std::endl;
thanks
When I test it,I found that it is strange.When I consume from rabbitmq,and I cout message.body().I find that there is always a more char behind my message on rabbitmq. AMQP::LibBoostAsioHandler handler(service);