Releases: nats-io/nats-java-vertx-client
v2.0.3 Fix by calling promise.complete
v2.0.2 Dispatcher Context
Use the Vertx Context when creating the dispatcher so it's event loops comes from the creator and will be different from the connection's loop.
v 2.0.1 Custom dispatcher runOnVertxContext
Merge pull request #63 from nats-io/2-0-1 Release for 2.0.1 and update JNATS dependency
v2.0.0-beta21 Custom dispatcher runOnVertxContext
Merge pull request #62 from nats-io/custom-dispatcher Custom Dispatcher to provide for publish on vertx context
v2.0.0-beta20 Implement consumeByteCount
Implement consumeByteCount in the NatsVertxMessage.
v2.0.0-beta19 Implement consumeByteCount
Implement consumeByteCount in the NatsVertxMessage.
v2.0.0-beta18 Updated to JNats 2.16.14
Summary
Updated to JNats dependency to 2.16.14 and added code to support JNats Message interface change.
Release notes for v2.0.0-beta17
Relese notes for for v2.0.0-beta17
Summary
- Started to create subscription object. (in preview mode, now matches original README.md)
- Added fetch and iterate convenience methods to stream.
Added
- Two new methods
fetch()
anditerate()
have been added to theNatsStream
interface. These methods allow the user to request a batch of messages from the subscription.
Changed
- The method
nextMessage()
has been removed.
Deprecated
- The method
pull()
has been removed. This method is no longer necessary, as the newfetch()
method can request a batch of messages from the subscription.
Fixed
- A bug has been fixed in the
NatsStreamImpl
class. The bug caused thefetch()
method to throw an exception if no messages were available in the subscription.
Overall, these changes improve the performance and usability of the NatsStream
interface. The new fetch()
method makes it easier for the user to retrieve messages from a subscription, and the deprecated pull()
method has been removed.
Preview SubscriptionReadStream
final Future<SubscriptionReadStream> subscribeFuture = natsStream.subscribe(subjectName,
PullSubscribeOptions.builder().build());
subscribeFuture.onSuccess(subscription -> {
final Future<List<NatsVertxMessage>> messageFuture = subscription.fetch(10, Duration.ofSeconds(5));
messageFuture.onSuccess(events -> {
events.forEach(NatsVertxMessage::ack);
}).onFailure(testContext::failNow);
}
}
).onFailure(event ->
{
event.printStackTrace();
testContext.failNow(event);
}
);
}
The next version of SubscriptionReadStream
will implement the NATS Subscription
interface and the Vertx ReadStream
. This is similar to how NatsStream
, NatsVertxMessage
and NatsClient
are done. If this makes sense.
v1.3.0-beta15 API Parity
Release Notes for nats-java-vertx-client
v1.3.0-beta15
The nats-java-vertx-client
is a Java client library for the NATS messaging system that uses the Vert.x interface. This release includes new features, enhancements, and bug fixes.
The base Java lib changed and added more methods with headers since this lib was released.
Changes
- #43 don't see a close() on the NATS Vert.x client that would map to the NATS client close
- #46 method request/publish(Message data) supports headers in both NatsClient and Stream. Nice to have other methods supporting headers too
- Improved code coverage #37 but more work to be done.
- Updated to support version 'io.nats:jnats:2.16.10' of client lib.
- Added support for in-progress and term message acknowledgments.
- Added asynchronous versions of message acknowledgment methods.
- Added documentation for pull subscribing.
- Added support for publishing and subscribing to JetStream-enabled servers.
- Added support for JetStream context creation.
- Added support for advanced publish options in JetStream.
- Added support for ordered push subscription option.
- Added NatsUtils class to create a stream or update stream subject if the stream exists.
Enhancements
- Improved the readability of the code examples in the documentation.
- Improved the error handling of the client library.
- Improved the compatibility with the Vert.x event-driven framework.
Bug Fixes
- Fixed a bug that caused the client library to fail when publishing messages with an empty data payload.
Breaking Changes
- None
Known Issues
- None at this time.
- Improvements are listed in Issues, but none are show-stoppers for this beta release.
JetStreamClusterMain Test
A new JetStreamClusterMain.java test is included in the project, showcasing how to use JetStream with a cluster setup. The test connects to a NATS cluster consisting of three nodes, creates or looks up a stream, and starts a consumer and producer, publishing and consuming messages from the stream. It also displays statistics on the number of messages sent and received and any errors encountered.
The JetStreamClusterMain.java test demonstrates how to use the JetStream API to manage and use streams in a NATS cluster, and serves as a useful starting point for developers who want to create a high-availability messaging system using JetStream.
What's Changed
- forgot to change version in build by @RichardHightower in #41
- progress on document improvement by @RichardHightower in #42
- Next release. API Parity and documentation improvement. by @RichardHightower in #47
Full Changelog: v1.1.2-beta12...v1.3.0-beta15
v1.1.2-beta12
v1.1.2-beta12 forgot to change the version tag in the build. This is the same as beta11.
I need to add a check as part of the build PR check.