Skip to content

feat: streaming example #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: streaming example #322

wants to merge 2 commits into from

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Aug 20, 2025

About the changes

Now that we released a new version of Java SDK with streaming support we can also add an example.

Run it with UNLEASH_API_TOKEN=sandbox_token UNLEASH_API_URL=sandbox_url ./gradlew run

The example listens to streaming changes and prints flag status and received events.

Most of the PR is boilerplate for gradle copied from other examples. Actual change is 60 LOC

Important files

Discussion points

}

dependencies {
implementation("io.getunleash:unleash-client-java:11.1.0")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version with streaming required


dependencies {
implementation("io.getunleash:unleash-client-java:11.1.0")
implementation("com.launchdarkly:okhttp-eventsource:4.1.1")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional dependency for streaming

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 17093964056

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 79.249%

Totals Coverage Status
Change from base Build 16902971413: 0.0%
Covered Lines: 2442
Relevant Lines: 3010

💛 - Coveralls

@gastonfournier gastonfournier moved this from New to In Progress in Issues and PRs Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants