简体   繁体   English

如何减少Alpakka的Kafka日志文件大小

[英]How can I reduce Kafka log file size of Alpakka

I am doing data replication in alpakka using Consumer.commitableSource. 我正在使用Consumer.commitableSource在alpakka中进行数据复制。 But, the size of kafka log file is increases very quickly. 但是,kafka日志文件的大小增长非常快。 The size reaches 5 gb in a day. 大小一天达到5 GB。 As a solution of this problem, ı want to delete processed data immediately. 作为此问题的解决方案,我想立即删除已处理的数据。 I am using delete record method in AdminClient to delete offset. 我在AdminClient中使用删除记录方法来删除偏移量。 But when I look at the log file, data corresponding to that offset is not deleted. 但是当我查看日志文件时,对应于该偏移量的数据不会被删除。

When using commitableSource you need to acknowledge that the record has been successfully read and is ready to be cleaned by committing the offset. 使用commitableSource您需要确认记录已被成功读取,并且可以通过提交偏移量来进行清理。 You can do that by calling commitJavadsl() . 您可以通过调用commitJavadsl() Take a look at the example in the documentation for more information. 查看文档中的示例以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何控制日志文件的大小? - How you can control the size of a log file? 如何在将视频上传到firebase之前减小视频的大小? - How can I reduce size of a video before uploading it to firebase? 如何每天以及在log4j中文件大小同时超过最大限制时滚动日志文件 - How can I rollover my log file on a daily basis and when the file size exceeds max limit at the same time in log4j 如何配置 Alpakka Slick 以启用来自 Java 中的数据库的流式传输? - How can I configure Alpakka Slick to enable streaming from my database in Java? 合并两个图像 --> 4 倍大小! 如何减小文件大小? - Merged two images --> 4 times the size! How do I reduce the file size? 旋转小程序。jtogglebutton的大小是6mb。 我如何缩小尺寸 - swing applet.. jtogglebutton size is 6mb. how can i reduce the size 如何减少java中多部分文件的大小 - How to reduce size of a multipart file in java 如何在不压缩的情况下减小图像文件的大小? - How to reduce the size of an image file without zipping it? 如何在java中减少图像文件的大小 - How to reduce image file size in java 如何在 Java 中以编程方式减小 PDF 文件大小? - How to reduce PDF file size programmatically in Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM