You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure that Kafka can store different key types: I believe that keys are just byte arrays.
If you pass an int to ->produce(), it will be converted to its decimal representation as a string. You can convert that back with intval($key) when consuming messages.
If you prefer an 8 byte long value, you can use pack('J', $key). You can convert that back with unpack('J', $key) when consuming messages.
When producing a record like this:
I'd need the key ($recordId) to be an 8 byte long value.
I think it is treated as string? Is there a way to tell the library to produce a long?
The text was updated successfully, but these errors were encountered: