-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Why not) use message batching? #273
Comments
How exactly batch them...? |
Not sure exactly how it would work in practice, but something like messages = detector_consumer.consume(num_messages=20, timeout=1.0) |
If it's about consuming multiple messages at once, yes, we should probably do that. But I didn't do that since that AOI kafka seems to have a better interface for that and it probably doesn't block the event loop: https://aiokafka.readthedocs.io/en/stable/api.html#aiokafka.AIOKafkaConsumer It also supports batch processing of messages but it seems like it only works if producer publishes messages in batch according to this documentation: https://docs.confluent.io/kafka/design/efficient-design.html ...? |
That is not how understood the mechanism. The consumer can decide how to fetch. Obviously, if we fetch too frequently we may only get a single message. But if we are willing to accept some more latency (which we also have with the "manual" beamlime-side batching) then we can fetch batches. |
Yes. What I said is, the
Yeah, but beamlime-side batching is to concatenate each fields of the dataset. How can it be handled by consumer itself...? |
One of the things Beamlime does is to consume, say, 14
ev44
messages per second, push them through the internal message router, collect them for a time interval, concat and hand them to the data reduction handler via the internal message router.Can we just use message batching? That might significantly simplify the logic.
The text was updated successfully, but these errors were encountered: