Skip to content

sample project to demonstrate java flow api initial functionality

Notifications You must be signed in to change notification settings

evgenyh/java-flow-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java 9 Flow Example

The Reactive Magazine Publisher

Description

This is a simple project that shows how to use Java 9's Flow API to create a Reactive Programming example. It's based on a story: a Magazine Publisher with two different Subscribers, one of them being too slow to pick items.

Code Structure

  • ReactiveFlowApp creates a Publisher using Java 9's SubmissionPublisher. It implements backpressure and dropping of items by setting a timeout for subscribers.
  • MagazineSubscriber implements Flow.Subscriber and let you experiment what happens when subscribers are slow.
  • ColorConsoleAppender has nothing to do with Java 9 or reactive programming, is just a utility class to set colors to log messages so the result can be understood easier.

About

sample project to demonstrate java flow api initial functionality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages