Skip to content

Commit 81b8079

Browse files
Merge pull request #4 from nats-io/updates
various updates
2 parents ab73a41 + 5d7bda6 commit 81b8079

File tree

3 files changed

+53
-4
lines changed

3 files changed

+53
-4
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Build Status](https://dev.azure.com/colin0754/NATS/_apis/build/status/nats-io.not.java?branchName=master)](https://dev.azure.com/colin0754/NATS/_build/latest?definitionId=1&branchName=master)
2+
13
# OpenTracing with NATS
24

35
Over the years, we've had periodic requests to support distributed tracing in
@@ -239,6 +241,48 @@ Sending hello on foo, server is nats://localhost:4222
239241
[main] INFO io.jaegertracing.internal.reporters.LoggingReporter - Span reported: 2d16a66cb0ea9a3:2d16a66cb0ea9a3:0:1 - Publish
240242
```
241243

244+
## Maven Coordinates
245+
246+
Most users will want to modify this code for their own application or environment, and we encourage users to do so and
247+
include in their own application or infrastructure code. If it is sufficient as-is, you can reference built jars via
248+
maven.
249+
250+
The NATS client is available on the Maven central repository, and can be imported as a normal dependency in your pom.xml file:
251+
252+
```xml
253+
<dependency>
254+
<groupId>io.nats</groupId>
255+
<artifactId>not</artifactId>
256+
<version>0.1.0</version>
257+
</dependency>
258+
```
259+
260+
If you need the absolute latest, before it propagates to maven central, you can use the repository:
261+
262+
```xml
263+
<repositories>
264+
<repository>
265+
<id>latest-repo</id>
266+
<url>https://oss.sonatype.org/content/repositories/releases</url>
267+
<releases><enabled>true</enabled></releases>
268+
<snapshots><enabled>false</enabled></snapshots>
269+
</repository>
270+
</repositories>
271+
```
272+
273+
Development snapshots can be found on the sonatype snapshots repository.
274+
275+
https://oss.sonatype.org/content/repositories/snapshots/
276+
277+
```xml
278+
<dependency>
279+
<groupId>io.nats</groupId>
280+
<artifactId>not</artifactId>
281+
<version>0.1.0-SNAPSHOT</version>
282+
<type>pom</type>
283+
</dependency>
284+
```
285+
242286
## Our sponsor for this project
243287

244288
Many thanks to [MasterCard](http://mastercard.com) for sponsoring this project.

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ dependencies {
6161
// Use JUnit test framework
6262
testImplementation 'junit:junit:4.12'
6363

64-
compile 'io.nats:jnats:2.4.2'
64+
compile 'io.nats:jnats:2.5.2'
6565

66-
compile 'io.opentracing:opentracing-api:0.32.0'
67-
compile 'io.opentracing:opentracing-util:0.32.0'
66+
compile 'io.opentracing:opentracing-api:0.33.0'
67+
compile 'io.opentracing:opentracing-util:0.33.0'
6868

6969
compile 'io.jaegertracing:jaeger-core:0.35.5'
7070
compile 'io.jaegertracing:jaeger-thrift:0.35.5'
@@ -129,4 +129,4 @@ uploadArchives {
129129
}
130130
}
131131
}
132-
}
132+
}

src/main/java/io/nats/client/not/TraceMessage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,9 @@ public byte[] getData() {
8989
public Subscription getSubscription() {
9090
return message.getSubscription();
9191
}
92+
93+
@Override
94+
public String getSID() {
95+
return message.getSID();
96+
}
9297
}

0 commit comments

Comments
 (0)