Skip to content

Commit 9bb9802

Browse files
authored
update Readme for v0.9 (#131)
1 parent b8dd6dd commit 9bb9802

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
![Build Status](https://github.com/hstreamdb/hstreamdb-java/actions/workflows/main.yml/badge.svg)
44
[![Maven Central](https://img.shields.io/maven-central/v/io.hstream/hstreamdb-java)](https://search.maven.org/artifact/io.hstream/hstreamdb-java)
5-
[![javadoc](https://javadoc.io/badge2/io.hstream/hstreamdb-java/0.8.0/javadoc.svg)](https://javadoc.io/doc/io.hstream/hstreamdb-java/0.8.0)
6-
[![Snapshot Artifacts](https://img.shields.io/nexus/s/https/s01.oss.sonatype.org/io.hstream/hstreamdb-java.svg)](https://s01.oss.sonatype.org/content/repositories/snapshots/io/hstream/hstreamdb-java/0.8.0-SNAPSHOT/)
7-
[![javadoc](https://javadoc.io/badge2/io.hstream/hstreamdb-java/0.8.0-SNAPSHOT/javadoc.svg)](https://hstreamdb.github.io/hstreamdb-java/javadoc/)
5+
[![javadoc](https://javadoc.io/badge2/io.hstream/hstreamdb-java/0.9.0/javadoc.svg)](https://javadoc.io/doc/io.hstream/hstreamdb-java/0.9.0)
6+
[![Snapshot Artifacts](https://img.shields.io/nexus/s/https/s01.oss.sonatype.org/io.hstream/hstreamdb-java.svg)](https://s01.oss.sonatype.org/content/repositories/snapshots/io/hstream/hstreamdb-java/0.9.0-SNAPSHOT/)
7+
[![javadoc](https://javadoc.io/badge2/io.hstream/hstreamdb-java/0.9.0-SNAPSHOT/javadoc.svg)](https://hstreamdb.github.io/hstreamdb-java/javadoc/)
88

99
This is the official Java client library for [HStreamDB](https://hstream.io/).
1010

1111
**Please use the latest released version.**
1212

13-
**The latest release is v0.8.0, which requires hstream server v0.8.0 .**
13+
**The latest release is v0.9.0, which requires hstream server v0.9.0 .**
1414

1515
## Content
1616
- [Installation](#installation)
@@ -20,7 +20,9 @@ This is the official Java client library for [HStreamDB](https://hstream.io/).
2020
- [Connect to HStreamDB](#connect-to-hstreamdb)
2121
- [Work with Streams](#work-with-streams)
2222
- [Write Data to a Stream](#write-data-to-a-stream)
23-
- [Consume Data from a Stream](#consume-data-from-a-stream)
23+
- [Consume Data from a Stream](#consume-data-from-a-subscription)
24+
- [Read Data from a Stream Shard](#read-data-from-a-stream-shard)
25+
2426

2527
## Installation
2628

@@ -37,7 +39,7 @@ For Maven Users, the library can be included easily like this:
3739
<dependency>
3840
<groupId>io.hstream</groupId>
3941
<artifactId>hstreamdb-java</artifactId>
40-
<version>0.8.0</version>
42+
<version>0.9.0</version>
4143
</dependency>
4244
</dependencies>
4345

@@ -49,7 +51,7 @@ For Gradle Users, the library can be included easily like this:
4951

5052
```groovy
5153
52-
implementation 'io.hstream:hstreamdb-java:0.8.0'
54+
implementation 'io.hstream:hstreamdb-java:0.9.0'
5355
5456
```
5557

@@ -152,7 +154,7 @@ batchedProducer.close();
152154
**Please do not write both binary data and hrecord in one stream.**
153155

154156

155-
### Consume Data from a Stream
157+
### Consume Data from a Subscription
156158

157159
```java
158160
// first, create a subscription for the stream
@@ -182,3 +184,22 @@ consumer.startAsync().awaitRunning();
182184
System.out.println("the consumer is started");
183185

184186
```
187+
188+
### Read Data from a Stream Shard
189+
190+
```java
191+
192+
Reader reader =
193+
client
194+
.newReader()
195+
.readerId("my_readerId")
196+
.streamName("my_stream")
197+
.shardId("my_shardId")
198+
.build();
199+
200+
201+
List<Record> records = reader.read(10).join();
202+
203+
reader.close();
204+
205+
```

0 commit comments

Comments
 (0)