Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A sample application using Java 9's Flow API and SubmissionPublisher

NotificationsYou must be signed in to change notification settings

mechero/java-9-flow-reactive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

The guideReactive Programming with Java 9 Flow explains this code and the fictional use case with detail.

Code Structure

  • ReactiveFlowApp creates a Publisher using Java 9'sSubmissionPublisher. It implements backpressure and dropping of items by setting a timeout for subscribers.
  • MagazineSubscriber implementsFlow.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.

Feedback and Contribution

If you find something wrong, feel free to create an issue. Same if you have questions. If you want to help me creating more code examples you canbuy me a coffee.

About

A sample application using Java 9's Flow API and SubmissionPublisher

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp