-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade jnats.rb wrapper to use jnats.jar 2.6.0 #42
Open
film42
wants to merge
11
commits into
master
Choose a base branch
from
gt/new_jnats
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liveh2o
approved these changes
Aug 6, 2019
Perhaps we can cut a beta release to test before making this GA? |
Pre-released |
This happens when we attempt to use nats during a restart state. It will tell us we cannot queue messages (this is good), but does so via illegal state exception. So we need to be able to handle it.
Example: W, [2019-08-20T15:58:37.262665 #32493] WARN -- : An Java::JavaLang::IllegalStateException was raised. We are going to sleep for 5 seconds.
Pre-released 0.11.0.pre1 has been pushed to rubygems. |
Saw some strange errors in production. I'll need to track those down. It's been a long time since I've been able to check back in on this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version 2.0 of jnats was a complete rewrite. We could not upgrade before now because the Dispatcher class had a map data structure that prevented duplicate subscriptions from being created (a feature we use for slowly introducing traffic while the JVM warms up). As of 2.6.0 we can once again subscribe multiple times, so we can upgrade, yay!
Since v2 was a rewrite, you'll notice quite a bit of jnats changed. I added helper classes to satisfy java interfaces required to use the new jnats lib. Because the new Dispatcher manages the actual dispatching, we are able to our own supervisor/ conusmer methods which is really nice. I also added more specs around the jnats.rb wrapper to gain confidence that we're compatible.
The benchmarks appear to be about the same between v1 and v2 of the jnats lib.
The variance is pretty high, and I can get the results to flip-flop. Benchmarking multi-threaded network code is hard, but this is a loose illustration to show that perf should be about the same.
Once I get a 👍 I'll cut a pre-release and test it in production for a few days.
cc @abrandoned @minond @liveh2o