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
#Disable for now, upload archives fails because of IP address changes - "test ${TRAVIS_PULL_REQUEST} != 'true' && test ${TRAVIS_BRANCH} = 'master' && ./gradlew closeAndReleaseRepository"
Copy file name to clipboardExpand all lines: README.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ A [Java](http://java.com) client for the [NATS messaging system](https://nats.io
12
12
13
13
## A Note on Versions
14
14
15
+
The NATS server renamed itself from gnatsd to nats-server around 2.4.4. This and other files try to use the new names, but some underlying code may change over several versions. If you are building yourself, please keep an eye out for issues and report them.
16
+
15
17
This is version 2.1 of the java-nats library. This version is a ground up rewrite of the original library. Part of the goal of this re-write was to address the excessive use of threads, we created a Dispatcher construct to allow applications to control thread creation more intentionally. This version also removes all non-JDK runtime dependencies.
16
18
17
19
The API is [simple to use](#listening-for-incoming-messages) and highly [performant](#Benchmarking).
@@ -36,9 +38,9 @@ The java-nats client is provided in a single jar file, with a single external de
36
38
37
39
### Downloading the Jar
38
40
39
-
You can download the latest jar at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.3/jnats-2.4.3.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.3/jnats-2.4.3.jar).
41
+
You can download the latest jar at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.4/jnats-2.4.4.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.4/jnats-2.4.4.jar).
40
42
41
-
The examples are available at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.3/jnats-2.4.3-examples.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.3/jnats-2.4.3-examples.jar).
43
+
The examples are available at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.4/jnats-2.4.4-examples.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.4.4/jnats-2.4.4-examples.jar).
42
44
43
45
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).
44
46
@@ -48,7 +50,7 @@ The NATS client is available in the Maven central repository, and can be importe
48
50
49
51
```groovy
50
52
dependencies {
51
-
implementation 'io.nats:jnats:2.4.3'
53
+
implementation 'io.nats:jnats:2.4.4'
52
54
}
53
55
```
54
56
@@ -74,7 +76,7 @@ The NATS client is available on the Maven central repository, and can be importe
74
76
<dependency>
75
77
<groupId>io.nats</groupId>
76
78
<artifactId>jnats</artifactId>
77
-
<version>2.4.3</version>
79
+
<version>2.4.4</version>
78
80
</dependency>
79
81
```
80
82
@@ -101,7 +103,7 @@ NATS uses RNG to generate unique inbox names. A peculiarity of the JDK on Linux
101
103
102
104
## Basic Usage
103
105
104
-
Sending and receiving with NATS is as simple as connecting to the gnatsd and publishing or subscribing for messages. A number of examples are provided in this repo as described in [examples.md](src/examples/java/io/nats/examples/examples.md).
106
+
Sending and receiving with NATS is as simple as connecting to the nats-server and publishing or subscribing for messages. A number of examples are provided in this repo as described in [examples.md](src/examples/java/io/nats/examples/examples.md).
105
107
106
108
### Connecting
107
109
@@ -232,7 +234,7 @@ If you want to try out these techniques, take a look at the [examples.md](src/ex
232
234
233
235
### Clusters&Reconnecting
234
236
235
-
TheJava client will automatically reconnect if it loses its connection the gnatsd. If given a single server, the client will keep trying that one. If given a list of servers, the client will rotate between them. When the gnatsd servers are in a cluster, they will tell the client about the other servers, so that in the simplest case a client could connect to one server, learn about the cluster and reconnect to another server if its initial one goes down.
237
+
TheJava client will automatically reconnect if it loses its connection the nats-server. If given a single server, the client will keep trying that one. If given a list of servers, the client will rotate between them. When the nats servers are in a cluster, they will tell the client about the other servers, so that in the simplest case a client could connect to one server, learn about the cluster and reconnect to another server if its initial one goes down.
236
238
237
239
To tell the connection about multiple servers for the initial connection, use the `servers()` method on the options builder, or call `server()` multiple times.
238
240
@@ -245,7 +247,7 @@ Reconnection behavior is controlled via a few options, see the javadoc for the O
245
247
246
248
## Benchmarking
247
249
248
-
The `io.nats.examples` package contains two benchmarking tools, modeled after tools in other NATS clients. Both examples run against an existing gnatsd. The first called `io.nats.examples.benchmark.NatsBench` runs two simple tests, the first simply publishes messages, the second also receives messages. Tests are run with 1 thread/connection per publisher or subscriber. Running on an iMac (2017), with 4.2 GHz Intel Core i7 and 64GB of memory produced results like:
250
+
The `io.nats.examples` package contains two benchmarking tools, modeled after tools in other NATS clients. Both examples run against an existing nats-server. The first called `io.nats.examples.benchmark.NatsBench` runs two simple tests, the first simply publishes messages, the second also receives messages. Tests are run with 1 thread/connection per publisher or subscriber. Running on an iMac (2017), with 4.2 GHz Intel Core i7 and 64GB of memory produced results like:
@@ -371,7 +373,7 @@ The java doc is located in `build/docs` and the example jar is in `build/libs`.
371
373
372
374
which will create a folder called `build/reports/jacoco` containing the file `index.html` you can open and use to browse the coverage. Keep in mind we have focused on library test coverage, not coverage for the examples.
373
375
374
-
Many of the tests run gnatsd on a custom port. If gnatsd is in your path they should just work, but in cases where it is not, or an IDE running tests has issues with the path you can specify the gnatsd location with the environment variable `gnatsd_path`.
376
+
Many of the tests run nats-server on a custom port. If nats-server is in your path they should just work, but in cases where it is not, or an IDE running tests has issues with the path you can specify the nats-server location with the environment variable `nats_-_server_path`.
0 commit comments