Skip to content

Java Concurrency programming - use producer-consumer-problem model to improve performance.

License

Notifications You must be signed in to change notification settings

chenrulongmaster/producer-consumer-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Producer-Consumer-Problem sample

996.icu LICENSE

Java Concurrency programming - use producer-consumer-problem to improve performance.

Generically speaking, when setup a module in distributed system, we need to connect to the other modules through MQ middleware. For showing how the producer-consumer module works, this sample will use file system to replace the MQ middleware.

I integrate this sample with Spring framework, so you can just change the logic for consumer, producer and pipeline. Then use it in your company project easily.

There are still same reminder:

  1. Don't forget to backup your MESSAGE in producer(Producer.java line56).
  2. Don't forget to delete your temporary file when you have done your task in consumer(Consumer.java line34).
  3. Tune your thread size in applicationContext.xml.

Feel free to send email to me [email protected] if you have any questions. And welcome to my blog GeekerSquare.

About

Java Concurrency programming - use producer-consumer-problem model to improve performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages