Skip to content

Releases: nats-io/nats-java-vertx-client

v2.0.3 Fix by calling promise.complete

08 Mar 19:55
505ecb9
Compare
Choose a tag to compare

Fixed: complete was not called on promise during unsubscribe

v2.0.2 Dispatcher Context

25 Jan 17:12
e47fd57
Compare
Choose a tag to compare

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

23 Oct 14:30
907f0b7
Compare
Choose a tag to compare
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

09 Oct 17:08
f54b786
Compare
Choose a tag to compare
Merge pull request #62 from nats-io/custom-dispatcher

Custom Dispatcher to provide for publish on vertx context

v2.0.0-beta20 Implement consumeByteCount

19 Sep 22:21
509f220
Compare
Choose a tag to compare

Implement consumeByteCount in the NatsVertxMessage.

v2.0.0-beta19 Implement consumeByteCount

19 Sep 20:28
39ef971
Compare
Choose a tag to compare

Implement consumeByteCount in the NatsVertxMessage.

v2.0.0-beta18 Updated to JNats 2.16.14

08 Sep 17:59
5b535c1
Compare
Choose a tag to compare

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

13 Jun 03:15
d45e805
Compare
Choose a tag to compare

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() and iterate() have been added to the NatsStream 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 new fetch() method can request a batch of messages from the subscription.

Fixed

  • A bug has been fixed in the NatsStreamImpl class. The bug caused the fetch() 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

01 May 06:20
f6f5fb5
Compare
Choose a tag to compare

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

Full Changelog: v1.1.2-beta12...v1.3.0-beta15

v1.1.2-beta12

07 Mar 18:36
14bf1a0
Compare
Choose a tag to compare

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.