Skip to content

Commit

Permalink
docs: added graalvm setup example (#1112)
Browse files Browse the repository at this point in the history
Admin merge of approved fork
  • Loading branch information
YunaBraska authored Apr 6, 2024
1 parent 5575f0e commit bb8a5b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,17 @@ If you need a snapshot version, you must enable snapshots and change your depend

If you are using the 1.x version of java-nats and don't want to upgrade to 2.0.0 please use ranges in your POM file, java-nats-streaming 1.x is using [1.1, 1.9.9) for this.

### Using GraalVM Example

Important GraalVM configurations are `--initialize-at-run-time=io.nats.client.support.RandomUtils`
and `--initialize-at-run-time=java.security.SecureRandom`. These will instruct GraalVM to initialize specified classes
at runtime. So that these instances don't have fixed seeds. GraalVM won't compile without these parameters.

Explore the [nats-graalvm-example](https://github.com/YunaBraska/nats-graalvm-example) repository for a straightforward
demonstration on creating efficient NATS clients with GraalVM.
This example leverages the [jNats](https://github.com/nats-io/nats.java) client to connect to a
[NATS test server](https://github.com/YunaBraska/nats-server), which is included within the project.

## Basic Usage

Sending and receiving with NATS is as simple as connecting to the nats-server and publishing or subscribing for messages.
Expand Down

0 comments on commit bb8a5b3

Please sign in to comment.