diff --git a/docs/caveats.md b/docs/caveats.md index 6cf5f33fa5ff8810b15af3daf6b8f12a5898e4a0..517a4749315bba0b92ad77104248c300ba718d88 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -5,7 +5,7 @@ Things to look out for ## memoryviews -Since CoolAMQP tries to be fast, it uses memoryviews everywhere. _ReceivedMessage_ objects, and message +Since CoolAMQP tries to be fast, it uses memoryviews everywhere. _ReceivedMessage_ properties, and message properties therefore, are memoryviews. So, it you wanted to read the routing key a message was sent with, or message's encoding, you should do: @@ -17,3 +17,6 @@ received_msg.properties.content_encoding.to_bytes() Only the _body_ property of the message will be a byte object (and not even that it you set an option in Cluster.consume). +Note that YOU, when sending messages, should not use memoryviews. Pass proper byte objects and text objects +as required. +