Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uuid type support for correlation_id property #38

Closed
pierreca opened this issue Jan 23, 2018 · 2 comments
Closed

uuid type support for correlation_id property #38

pierreca opened this issue Jan 23, 2018 · 2 comments

Comments

@pierreca
Copy link

pierreca commented Jan 23, 2018

Hi, i'm trying to figure out a way to "force" the library to decode the correlation_id property of a message I'm receiving as a UUID. Right now i only get a Buffer (UInt8Array) - i'm trying to make my way through the type system but i get a bit lost in there.... any pointers or suggestions?

Thanks!

[edit] I'm able to "read" the uuid from the buffer by using this package: https://www.npmjs.com/package/uuid-buffer
but I also need to send it "re-encoded" as a uuid - and in that case it looks like I fall into this "todo" item

Feels like either one would need a way to "force" the type of the property OR you'd need to "detect" uuids from strings or buffers and encode them with the proper type (might be expensive).

thoughts?

grs added a commit that referenced this issue Jan 23, 2018
@grs
Copy link
Member

grs commented Jan 23, 2018

I've checked in a fix, recognising a 16 byte buffer as the message-id.

@pierreca
Copy link
Author

wow that was quick, thanks :) fix works on my side too, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants