You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,9 @@ The java-nats client is provided in a single jar file, with a single external de
52
52
53
53
### Downloading the Jar
54
54
55
-
You can download the latest jar at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.5.2/jnats-2.5.2.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.5.2/jnats-2.5.2.jar).
55
+
You can download the latest jar at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.6.0/jnats-2.6.0.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.6.0/jnats-2.6.0.jar).
56
56
57
-
The examples are available at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.5.2/jnats-2.5.2-examples.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.5.2/jnats-2.5.2-examples.jar).
57
+
The examples are available at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.6.0/jnats-2.6.0-examples.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.6.0/jnats-2.6.0-examples.jar).
58
58
59
59
To use NKeys, you will need the ed25519 library, which can be downloaded at [https://repo1.maven.org/maven2/net/i2p/crypto/eddsa/0.3.0/eddsa-0.3.0.jar](https://repo1.maven.org/maven2/net/i2p/crypto/eddsa/0.3.0/eddsa-0.3.0.jar).
60
60
@@ -64,7 +64,7 @@ The NATS client is available in the Maven central repository, and can be importe
64
64
65
65
```groovy
66
66
dependencies {
67
-
implementation 'io.nats:jnats:2.5.2'
67
+
implementation 'io.nats:jnats:2.6.0'
68
68
}
69
69
```
70
70
@@ -90,7 +90,7 @@ The NATS client is available on the Maven central repository, and can be importe
90
90
<dependency>
91
91
<groupId>io.nats</groupId>
92
92
<artifactId>jnats</artifactId>
93
-
<version>2.5.2</version>
93
+
<version>2.6.0</version>
94
94
</dependency>
95
95
```
96
96
@@ -194,7 +194,7 @@ The Java NATS library provides two mechanisms to listen for messages, three if y
2.ADispatcher that will call application code in a background thread. Dispatchers can manage multiple subjects with a single thread and single callback.
197
+
2.ADispatcher that will call application code in a background thread. Dispatchers can manage multiple subjects with a single thread and shared callback.
198
198
199
199
```java
200
200
Dispatcher d = nc.createDispatcher((msg) -> {
@@ -205,6 +205,18 @@ The Java NATS library provides two mechanisms to listen for messages, three if y
205
205
d.subscribe("subject");
206
206
```
207
207
208
+
A dispatcher can also accept individual callbacks for any given subscription.
209
+
210
+
```java
211
+
Dispatcher d = nc.createDispatcher((msg) -> {});
212
+
213
+
Subscription s = d.subscribe("some.subject", (msg) -> {
0 commit comments