{"id":24435328,"url":"https://github.com/s2-streamstore/s2-sdk-java","last_synced_at":"2025-04-12T15:32:09.242Z","repository":{"id":269512169,"uuid":"907643035","full_name":"s2-streamstore/s2-sdk-java","owner":"s2-streamstore","description":"Java SDK for S2","archived":false,"fork":false,"pushed_at":"2025-03-12T04:03:20.000Z","size":1815,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T13:46:31.099Z","etag":null,"topics":["java","s2","serverless","stream","streaming"],"latest_commit_sha":null,"homepage":"https://s2.dev","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s2-streamstore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-24T04:06:36.000Z","updated_at":"2025-03-12T03:28:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"87452bb8-d744-4e55-8ec6-2930899e3187","html_url":"https://github.com/s2-streamstore/s2-sdk-java","commit_stats":null,"previous_names":["asragab/s2-java-sdk","s2-streamstore/s2-sdk-java"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2-sdk-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s2-streamstore","download_url":"https://codeload.github.com/s2-streamstore/s2-sdk-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589355,"owners_count":21129595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","s2","serverless","stream","streaming"],"created_at":"2025-01-20T17:19:18.946Z","updated_at":"2025-04-12T15:32:09.228Z","avatar_url":"https://github.com/s2-streamstore.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S2 Java SDK\n\nA Java SDK for interacting with the S2 streaming service.\n\n#### Current Java API Documentation\n\n- [s2-sdk @ 0.0.14](https://s2-streamstore.github.io/s2-sdk-java/javadocs/s2-sdk/0.0.14/)\n- [s2-internal @ 0.0.14](https://s2-streamstore.github.io/s2-sdk-java/javadocs/s2-internal/0.0.14/)\n\n## Prerequisites\n\n- Java 11 or higher\n- Gradle 8.5 or higher\n- An S2 account and bearer token\n\n### Building from Source\n\n1. Clone the repository:\n\n```bash\ngit clone \\\n  --recurse-submodules \\\n  https://github.com/s2-streamstore/s2-sdk-java \n\ncd s2-sdk-java\n```\n\n2. Build the project:\n\n```bash\n./gradlew build\n```\n\n3. Install to local Maven repository:\n\n```bash\n./gradlew publishToMavenLocal\n```\n\n### Using Maven (with GitHub Packages)\n\nPackages listed on this repo can be downloaded from GitHub's Maven repository. This document goes\nthrough [the details](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry),\nbut typically this involves:\n\n- Creating a new personal access token with `read:packages` permissions\n- Configuring your\n  `~/.m2/settings.xml` to look like the\n  example [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token)\n    - The relevant URL would be `https://maven.pkg.github.com/s2-streamstore/s2-sdk-java`\n- Adding the relevant package(s) to your project's `pom.xml` (each\n  individual [package](https://github.com/s2-streamstore/s2-sdk-java/packages/) should list the XML\n  representation of the dependency)\n\n### Using Maven (Local Published Artifact)\n\nAdd this dependency to your `pom.xml`:\n\n```xml\n\n\u003cdependency\u003e\n  \u003cgroupId\u003edev.s2\u003c/groupId\u003e\n  \u003cartifactId\u003es2-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e\u003c!--Use the current version specified in `gradle.properties`--\u003e\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Using Gradle (Kotlin DSL)\n\nAdd this dependency to your `build.gradle.kts`:\n\n```kotlin\n// pick a version from the releases, or specified in `gradle.properties`\nvar s2SdkVersion = \"SOMETHING\"\ndependencies {\n    implementation(\"dev.s2:s2-sdk:$s2SdkVersion\")\n}\n```\n\n## Project Structure\n\n- `s2-sdk/` - The main SDK module.\n- `s2-internal/` - Code and types generated from\n  the [S2 protobuf definitions](https://github.com/s2-streamstore/s2-protos).\n- `app/` - Example application demonstrating SDK usage.\n\n## Running the Example Apps\n\nThe example apps contain some simple demo uses of the SDK.\n\nFor all of these, you will need an S2 account. Sign up on [s2.dev](https://s2.dev/) if you haven't\nalready, and generate an auth token [in the dashboard](https://s2.dev/dashboard).\n\nFrom there, you can use the [S2 CLI](https://github.com/s2-streamstore/s2-cli) for creating new\nbasins and streams (or, try doing this using the SDK!).\n\nFor the demos discussed below, it will be helpful to create a new basin and stream.\n\nStart by setting some environment variables in your shell.\n\n```bash\nexport S2_AUTH_TOKEN=\"MY-SECRET\"\nexport S2_BASIN=\"my-demo-java\"\nexport S2_STREAM=\"test/1\"\n```\n\nThen, if you need to create the basin or stream, you can do so with the CLI:\n\n```bash\ns2 create-basin \"s2://${S2_BASIN}\"\ns2 create-stream \"s2://${S2_BASIN}/${S2_STREAM}\"\n```\n\n### Appending and reading records\n\nAssuming you've defined those variables above, you can start a managed append session that will try\nto append 50k random records (a total of ~500MiB) to your stream:\n\n```bash\n./gradlew runManagedAppendSessionDemo\n```\n\nSimilarly, you can use a managed read session to read those records:\n\n```bash\n./gradlew runManagedReadSessionDemo\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2-streamstore%2Fs2-sdk-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs2-streamstore%2Fs2-sdk-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2-streamstore%2Fs2-sdk-java/lists"}