Skip to content
Snippets Groups Projects
Commit a61d11f2 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

caveats

parent fab85bae
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ Things to look out for ...@@ -5,7 +5,7 @@ Things to look out for
## memoryviews ## 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, 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: or message's encoding, you should do:
...@@ -17,3 +17,6 @@ received_msg.properties.content_encoding.to_bytes() ...@@ -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 Only the _body_ property of the message will be a byte object (and not even that it you set an option
in Cluster.consume). in Cluster.consume).
Note that YOU, when sending messages, should not use memoryviews. Pass proper byte objects and text objects
as required.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment