Is it possible to disable caching for some kafka themes?

So, I have a script in kafka where there are 2 topics: A and B. Theme. Consumers are connected to the network (and need to quickly consume data), and users of topic B are offline. Since users of topic B are not connected to the network, I don’t need to cache any message related to topic B right now and want topic A to receive the entire cache. Is it possible to disable caching for some Kafka themes?

Edit: What I mean by caching is that messages are stored in memory, and consumers also read from memory (instead of disk). In this case, I would like messages related to topic A to be cached in memory. And messages related to topic B do not need to be cached in memory. I want topic A to use the memory space that would be assigned to topic B

+4
source share
2 answers

Kafka relies heavily on a file system for storing and caching messages. The only configuration available in cache cache is the size of the client stream buffer, which is used to buffer incoming messages - cache.max.bytes.buffering.

+1
source

:

Kafka, spark.streaming.kafka.consumer.cache.enabled false.

github, .

+5

Source: https://habr.com/ru/post/1684400/


All Articles