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
Another option is to configure a custom client partitioner that implements `call(partition_count, message)` and uses the same schema as the other client. For example:
354
+
355
+
```ruby
356
+
classCustomPartitioner
357
+
defcall(partition_count, message)
358
+
...
359
+
end
360
+
end
361
+
362
+
partitioner =CustomPartitioner.new
363
+
Kafka.new(partitioner: partitioner, ...)
364
+
```
365
+
366
+
Or, simply create a Proc handling the partitioning logic instead of having to add a new class. For example:
The producer is designed for resilience in the face of temporary network errors, Kafka broker failovers, and other issues that prevent the client from writing messages to the destination topics. It does this by employing local, in-memory buffers. Only when messages are acknowledged by a Kafka broker will they be removed from the buffer.
0 commit comments