Redis the list structure can be used as a queue to use, rpush production news, consumer news lpop, when lpop did not get the message, you can thread to sleep for a while and then get the message
blpop instruction queue when there are no messages will be blocked until a message thread is produced, get messages
[Java interview questions and answers To arrange recommend
- Basic and Grammar
- set
- network programming
- Concurrent Programming
- Web
- Safety
- Design Patterns
- frame
- Algorithms and Data Structures
- abnormal
- File parsing and generation
- Linux
- MySQL
- Oracle
- Redis
- Dubbo