Support size check when adding multiple records into set
Is your feature request related to a problem? Please describe. Currently we only support size check before sending the message, but adding multiple records to set will also cause size excess. We should make sure the set size is under size limit when adding records.
Describe the solution you'd like Solution 1:
- add record to set, check current length and length difference
- if current length exceeds limit, revert set buffer by length difference
Solution 2:
- build the record from element list
- provide method to add record directly to set and check the size
- if total length exceeds limit, return error
Prefer Solution 2. This will make it easier for user to consume the library.
I think we should essentially provide an interface that takes in element list with values, and inside the interface, we should create/build the record, maintain the set and send the set when appropriate. In addition, we should also add the capability to send the set immediately with a boolean.
Maintaining sets may not be straightforward. We need to maintain sets for different template IDs, and both for template and data sets.
And better to design this in such a way that it will be easy to extend support for multiple sets.
Considering the above may be a short description of design consideration is better, so that we will not miss some essential things.
@yiou: Is Issue #55 a duplicate of this issue? If so, please close that one.
@yiou: Is Issue #55 a duplicate of this issue? If so, please close that one.
Yes, they are duplications. Closing that.