Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Binary message read error #6

@lufeng1102

Description

@lufeng1102

My message use msgPack to serialization and use snappy to compress , when i use amqpcpp to load it, the object AMQPMesage will no return the length of message, i only get the char* using getMessage() in AMQPMessage. So if the message is binary format , using amqp will not get the right message body.

My message is like this ,i use rabbit-c to dump it.

gxl@gxl-desktop:~/programe/Rabbitmq/rabbitmq-c-7cecf64752fd/examples$ ./amqp_listenq 192.168.166.62 5672 xunuu_build
Result 0
Frame type 1, channel 1
Method AMQP_BASIC_DELIVER_METHOD

Delivery 1, exchange search_engine routingkey build

00000000: F1 0D F0 4E 00 A4 55 55 : 69 64 01 00 A5 74 69 74 ...N..UUid...tit
00000010: 6C 65 A7 53 75 6D 6D 65 : 72 79 DA 06 D8 50 6F 73 le.Summery...Pos
00000020: 74 67 72 65 53 51 4C 20 : 70 72 69 64 65 73 20 69 tgreSQL prides i
00000030: 74 73 65 6C 66 20 69 6E : 20 73 74 61 6E 64 61 72 tself in standar
00000040: 64 73 20 63 6F 6D 70 6C : 69 61 6E 63 65 2E 20 49 ds compliance. I
00000050: 74 73 20 01 2F 30 69 6D : 70 6C 65 6D 65 6E 74 61 ts ./0implementa
00000060: 74 69 6F 01 2D 90 72 6F : 6E 67 6C 79 20 63 6F 6E tio.-.rongly con
00000070: 66 6F 72 6D 73 20 74 6F : 20 74 68 65 20 41 4E 53 forms to the ANS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions