Open ThomasChiroux opened 3 years ago
complement analysis:
Below are assumptions, i've not tested the hypothesis and i'm not - at all - an Erlang expert ;-)
This may be linked to the way jiffy encodes json, here:
It seems that if the message reach a certain size, jiffy returns a list instead of bytes: https://github.com/davisp/jiffy/issues/183
My asymption is that this list is later sent / aggregated in the wrong order..
MongooseIM version: 4.1.0 Installed from: source Erlang/OTP version: 23.1.5
I've configured mongoose to send amqp message to my rabbitmq server when a user send new message (for internal notificaton solution purposes).
Here is below a working example and non working example. They are extracted in rabbitmq directly in the queue, using admin command:
working example, message at exactly 2037 bytes:
Non working example with message at 2038 bytes (I only added a 'z' caracter at then end of the same message)
you can see that the resulting payload is "shifted":
a part that should be at the end of the payload:
is placed at the beginning of the payload. The resulting payload is not json-decodage anymore.
in addition: (In my case i do not need payloads (I ignore them, but I still need to decode json to get to and from parameters. not regarding this bug, it could be a good bandwith saving configuration option to be able to remove the payload for such amqp message like "backend.rabbit.chat_msg_exchange.payload = false" (with true by default, same for groupchat))
Thanks,
Regards, Thomas.
PS the mongoose config: