-
Notifications
You must be signed in to change notification settings - Fork 81
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
Make PCFExecute.unpack()
return full header
#212
Conversation
PCFExecute.unpack()
return full header
Is the unpack method something that users will commonly invoke in their code? If it is not then I see not issues with making such a backward-incompatible change, particularly if that code has been around for only two weeks. |
I think this is not needed, because can be easily extracted from message:
|
Yes, agree it can be unpacked separately as you suggested. But that would mean unpacking twice if we want both the message and the header (not the end of the world, but avoiding extra processing is probably good).
Not sure about all use cases. But In the use case I have, it's yes, in order process messages from |
OK, it's good example. |
mqcfh.Control added just for internal needs - stops messages reading , when last message arrived. I think, changing this does not break anything. |
Thx for the fix d9a5918 |
Just for info: unpacks are not our terrible foe :), but yes it has one of the biggest
|
It seems some methods like
vs
For a large payload like
|
The header is also part of things we unpack, we should return it too. The data in the header can be as useful as the data in the message itself.
Use case: decide how to process the unpacked message depending on the header information (e.g. header.Command).
This is a breaking change since the
PCFExecute.unpack()
method is already released inv1.11.1
, for people relying onmqcfh.Control
previously returned.Open questions:
cc @SeyfSV