First of all, this is not called a memory leak. The name is a bit loose
If you don’t have high reliability requirements, you can consider randomly throwing away some
Expansion Hardware
If you have requirements for reliability. To put it simply, it is thrown into the hard disk or database first. In short, it cannot be stored in the memory. It's a bit like the Socket instance in Java. There is an InputStream and OutputStream that maintain a SendQ queue and a RecvQ queue respectively, but it is in memory and we just put it on the hard disk.
First of all, this is not called a memory leak. The name is a bit loose
If you don’t have high reliability requirements, you can consider randomly throwing away some
Expansion Hardware
If you have requirements for reliability. To put it simply, it is thrown into the hard disk or database first. In short, it cannot be stored in the memory. It's a bit like the Socket instance in Java. There is an InputStream and OutputStream that maintain a SendQ queue and a RecvQ queue respectively, but it is in memory and we just put it on the hard disk.
Isn’t there one
RejectedExecutionHandler
?Even if the memory is leaked, the computer still doesn’t crash. RejectedExecutionHandler handles rejected tasks, why not use redis, haha