Comments (6)
- Based on this test, it looks like rhea will automatically serialize message_id as uuid type.
- For explicitly wrapping it as uuid you can take a look at this test.
from rhea.
Ok, I changed the title. Given an arbitrary property, what would be the recommended method for serializing out that property with the 0x98 encoding code followed by the 16 bytes of data.
from rhea.
rhea.types.wrap_uuid(x)
from rhea.
Torn between starting a new topic and simply continuing this one. Chose continue.
Gordon, what is your current understanding WITHOUT the pull request I submitted last week.
Talking about sending first.
When sending a message -
Are message_id and correlation_id treated special?
If I set these properties to a simple number will it be serialized as a ulong (of appropriate size)?
If I set these properties to a simple string (that doesn't look like a uuid), will it be set to one of the counted utf-8 string types?
If I place a string in the either of these _id fields that look like a uuid is it going to be serialized as type uuid (with encoding code of 0x98)?
If I place a buffer of length 16 bytes (which are returned by utils.uuid4()) in either of these _id fields will be be sent as a 0x98?
If I place a buffer of length 16 bytes (which are returned by utils.uuid()) in either of these _id fields will be be sent as an array?
If I force some arbitrary property (not correlation_id or message_id)
When receiving a message:
When receiving a message that contains a property that utilizes the encoding code of 0x98 the property
into which it is placed will use:
A 16 byte array?
A string?
from rhea.
Are message_id and correlation_id treated special?
Yes, in so far as they are properties that can take one of three defined types.
If I set these properties to a simple number will it be serialized as a ulong (of appropriate size)?
Yes
If I set these properties to a simple string (that doesn't look like a uuid), will it be set to one of the counted utf-8 string types?
Yes
If I place a string in the either of these _id fields that look like a uuid is it going to be serialized as type uuid (with encoding code of 0x98)?
No, it will only be serialized as a uuid if it is a Buffer.
If I place a buffer of length 16 bytes (which are returned by utils.uuid4()) in either of these _id fields will be be sent as a 0x98?
Yes
If I place a buffer of length 16 bytes (which are returned by utils.uuid()) in either of these _id fields will be be sent as an array?
Assuming you mean uuid4(), then no, they will be sent as a uuid. (An array is not a valid type for message_id or correlation_id).
If I force some arbitrary property (not correlation_id or message_id)
To send an application property, message- or delivery- annotation, or a field in a structured body as a UUID (i.e. 0x98 typecode) you need to explicitly tag it as such using types.wrap_uuid().
When receiving a message:
When receiving a message that contains a property that utilizes the encoding code of 0x98 the property into which it is placed will use:
A 16 byte array?
Yes
A string?
No, though you can get the string using util.uuid_to_string()
from rhea.
Thank for all the information. It simplified what I was trying to do.
from rhea.
Related Issues (20)
- Regression in PR #382: Handle transfer with no payload HOT 1
- Receiver (Consumer) does not receive message that are larger than ~4.15kb HOT 3
- How can I access virtual host using rhea with TLS? HOT 13
- Does it supports OAUTH2 mechanism? HOT 2
- ulong correlation_id incorrecly serialized as uuid HOT 3
- Acknowledgments doesnt work HOT 6
- idle_time_out fires which event? HOT 15
- Publish Window Size Property HOT 2
- `NetClientConnectionOptions` and `TlsClientConnectionOptions` should be exported
- Wildcard Topics HOT 15
- loosing messages intermittently while consuming from Azure service bus HOT 1
- Is `absolute_expiry_time` in milliseconds? HOT 7
- amqp:resource-limit-exceeded ERROR HOT 1
- `sendable` event not fired after certain amount of messages HOT 1
- How to use filters dynamically ? HOT 12
- Regenerate or remove ssl certificates for examples
- Connection RabbitMQ through websocket HOT 2
- Sender appears to be ignoring max_frame_size HOT 4
- connection_detail does not support hostname HOT 5
- Issue and question - Detached receivers / draining credits HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rhea.