Skip to content

Commit

Permalink
Merge pull request #124 from nats-io/2.1.5
Browse files Browse the repository at this point in the history
Updated for nats server rename
  • Loading branch information
Stephen Asbury committed May 10, 2019
2 parents 72f964e + aa40840 commit fb8d380
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Change Log

## Version 2.1.5

* [Changed] - Updates for renames related to NATS server and its repo.

## Version 2.1.4

* [Fixed] - #121 - Set protobuf dependency to 3.6.1 to avoid breaking version.
* [Fixed] - #119 - Fixed issue with client ids in stan bench when multiple subscribers are used.
* [Fixed] - #119 - Fixed an issue with client ids in stan bench when multiple subscribers are used.
* [Fixed] - #95 - Made ack inbox publicly available on subscriber.

## Version 2.1.3
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ A [Java](http://java.com) client for the [NATS streaming platform](https://nats.

## A Note on Versions

This is version 2.1.4 of the Java NATS streaming library. This version is a port to version 2.x of the Java NATS library and contains breaking changes due to the way the underlying library handles exceptions, especially timeouts.
This is version 2.1.5 of the Java NATS streaming library. This version is a port to version 2.x of the Java NATS library and contains breaking changes due to the way the underlying library handles exceptions, especially timeouts.

As of 2.1.5 the NATS server is undergoing a rename, as are the NATS repositories.

The new version minimizes threads. Only one thread is used for all callbacks, by relying on a dispatcher in the underlying NATS connection. If you want to deliver in multiple threads, you can use multiple StreamingConnections on the same underlying NATS connection. This reduces total thread usage while allowing callbacks to work independently. See [Sharing A NATS Connection](#sharing-a-nats-connection).

Expand All @@ -26,17 +28,17 @@ The nats streaming client requires two jar files to run, the java nats library a

### Downloading the Jar

You can download the latest NATS client jar at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.1.4/jnats-2.1.4.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.1.4/jnats-2.1.4.jar).
You can download the latest NATS client jar at [https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.1.5/jnats-2.1.5.jar](https://search.maven.org/remotecontent?filepath=io/nats/jnats/2.1.5/jnats-2.1.5.jar).

You can download the latest java nats streaming jar at [https://search.maven.org/remotecontent?filepath=io/nats/java-nats-streaming/2.1.4/java-nats-streaming-2.1.4.jar](https://search.maven.org/remotecontent?filepath=io/nats/java-nats-streaming/2.1.4/java-nats-streaming-2.1.4.jar).
You can download the latest java nats streaming jar at [https://search.maven.org/remotecontent?filepath=io/nats/java-nats-streaming/2.1.5/java-nats-streaming-2.1.5.jar](https://search.maven.org/remotecontent?filepath=io/nats/java-nats-streaming/2.1.5/java-nats-streaming-2.1.5.jar).

### Using Gradle

The NATS client is available in the Maven central repository, and can be imported as a standard dependency in your `build.gradle` file:

```groovy
dependencies {
implementation 'io.nats:java-nats-streaming:2.1.4'
implementation 'io.nats:java-nats-streaming:2.1.5'
}
```

Expand All @@ -62,7 +64,7 @@ The NATS client is available on the Maven central repository, and can be importe
<dependency>
<groupId>io.nats</groupId>
<artifactId>java-nats-streaming</artifactId>
<version>2.1.4</version>
<version>2.1.5</version>
</dependency>
```

Expand Down Expand Up @@ -347,7 +349,7 @@ you have to close `two` before you close `one` to avoid an exception.
### Controlling Callback Threads
The underlying NATS library uses the concept of dispatchers to organize callback threads. You can leverage this feature in 2.1.4 or later of this
The underlying NATS library uses the concept of dispatchers to organize callback threads. You can leverage this feature in 2.x or later of this
library by setting a dispatcher name on your subscriptions.
```java
Expand Down Expand Up @@ -388,7 +390,7 @@ The java doc is located in `build/docs` and the example jar is in `build/libs`.
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.
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`.
Many of the tests run nats-streaming-server on a custom port. If the `nats-streaming-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 server location with the environment variable `stan_path`.
## License
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ plugins {
// Update version here, repeated check-ins not into master will have snapshot on them
def versionMajor = 2
def versionMinor = 1
def versionPatch = 4
def versionPatch = 5
def versionModifier = ""
def jarVersion = "2.1.4"
def jarVersion = "2.1.5"
def branch = System.getenv("TRAVIS_BRANCH");

def getVersionName = { ->
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/nats/streaming/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private Options(Builder builder) {
}

/**
* @return the nats url to use to connect to gnatsd.
* @return the nats url to use to connect to the NATS server.
*/
String getNatsUrl() {
return natsUrl;
Expand Down Expand Up @@ -202,7 +202,7 @@ public Builder maxPubAcksInFlight(int maxPubAcksInFlight) {
}

/**
* Manually set the gnatsd connection
* Manually set the NATS connection
*
* @param natsConn a valid nats connection (from the latest version of the
* library)
Expand All @@ -214,7 +214,7 @@ public Builder natsConn(io.nats.client.Connection natsConn) {
}

/**
* Set the url to connect to for gnatsd
* Set the url to connect to for NATS
*
* @param natsUrl a valid nats url, see the client library for more information
* @return the builder for chaining
Expand Down

0 comments on commit fb8d380

Please sign in to comment.