Comments (7)
Oh I think you're right! Ah yes I even saw that behavior locally when I testing buffering vs not. When you produce sync from separate processes brod can allow things to buffer internally or not.
from kaffe.
@objectuser It looks like brod has some new settings based around controlling brod's internal buffering of messages. Maybe they could be used to make our message production more efficient.
%% max_linger_ms(optional, default = 0):
%% Messages are allowed to 'linger' in buffer for this amount of
%% milli-seconds before being sent.
%% Definition of 'linger': A message is in 'linger' state when it is allowed
%% to be sent on-wire, but chosen not to (for better batching).
%% The default value is 0 for 2 reasons:
%% 1. Backward compatibility (for 2.x releases)
%% 2. Not to surprise `brod:produce_sync' callers
%% max_linger_count(optional, default = 0):
%% At most this amount (count not size) of messages are allowed to 'linger'
%% in buffer. Messages will be sent regardless of 'linger' age when this
%% threshold is hit.
%% NOTE: It does not make sense to have this value set larger than
%% `partition_buffer_limit'
from kaffe.
@sdball I had looked at those previously. If I understand them correctly, it's like implicit buffering. If we used them, we could potentially produce_sync
, then ack an offset, crash and not write the messages.
Is that your understanding?
from kaffe.
@objectuser Yes that's possible, depending on how we control the ACKs back to Kafka. We'd want to ensure we only ACK the highest offset that we can definitively place at the end of a contiguous block of offsets.
Or write missed offsets to another system to be individually fetched and replayed?
from kaffe.
To be clear, these new fields only come into play if we use :brod.produce_async
from kaffe.
@sdball Based on the quoted reasoning I was thinking they could also be used with :brod.produce_sync
:
- Not to surprise
brod:produce_sync
callers
But maybe I'm misinterpreting.
Still, I think brod:produce_sync
with some batching is a good next step!
from kaffe.
Kaffe currently supports the latest Brod.
from kaffe.
Related Issues (20)
- Defining multiple handlers HOT 1
- worker_per_topic_partition with multiple topics HOT 1
- Examples not compatible with Elixir 1.10 or 1.11 HOT 2
- extract_der is giving error with SSL HOT 2
- Undefined function exponential_backoff HOT 10
- Offset doesn't get updated between runs and runs crash with OOM errors HOT 4
- async ack - lots of duplicate messages until I restart the application HOT 2
- Kaffe.Producer.produce_sync raises on timeout
- How to set kafka headers when publishing message HOT 1
- Invalid call to raise/reraise on brod/kpro error
- Add support for SCRAM mechanism in SASL authentication. HOT 1
- Module to help write ExUnit tests
- It's impossible to create 2 separate consumers for different topics
- Running mix with kaffe deps fails to download pc package from hex
- Wrong place for configuration
- Repeated rebalance cycle with kafka broker 2.3.0 HOT 16
- kaffe cannot recover from unreachable Kafka HOT 18
- Missing documentation HOT 8
- Connecting to a TLS-based Kafka instance under AWS MSK? HOT 18
- Receives notification when rebalance in progress/assignments revoked HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kaffe.