shibd commented on PR #294:
URL: 
https://github.com/apache/pulsar-client-cpp/pull/294#issuecomment-1621416158

   > In addition, I don't think use a null-terminated string as the tableview 
value is good for C API. The value is actually a byte array rather than a 
null-terminated string. Unlike the TableView class, it's okay to return a 
std::string, which is actually a byte array in C++. For example, if the 
producer sends 4 bytes: [0x01, 0x00, 0x02, 0x00], you can never know the length.
   
   Thanks explain, that makes sense to me.
   
   New 
[commit](https://github.com/shibd/pulsar-client-cpp/commit/c2471a27137dffae46e51903b8a6c2ddda6559f6)
 modifications:
   1. Add `*value_size` param on `pulsar_table_view_get_value`, 
`pulsar_table_view_retrieve_value` method and `pulsar_table_view_action`.
   2. Change `*value` type from `char **value` to `void **value`.
   3. Remove `pulsar_string_map_t 
*pulsar_table_view_snapshot(pulsar_table_view_t *table_view)` method. Because 
on this case.
    -  `pulsar_string_map_get` also does not return value_size, 
    -  this **string_map** may not be suitable for `table_view` for C.
    -  I think the `table_view` currently provided interface can meet the user 
use case.
    -  If needed, I'll add it in another PR.
   
   
   PTAL.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to