Skip to content

Release v0.6.0

Compare
Choose a tag to compare
@wallyqs wallyqs released this 19 Jun 23:36

Release with support for NATS v2 auth features

Added

  • Support for user credentials that contain a JWT/NKEY to auth against NATS v2 servers
      nats.connect(servers: ['tls://connect.ngs.global:4222'],
                   user_credentials: "path/to/user.creds")
  • Support to authenticate against NATS v2 servers that use NKEYS
      nats.connect(servers: ['tls://connect.ngs.global:4222'],
                   nkeys_seed: "path/to/user.nk")
  • Adds simpler connect API that takes a single URL
    # Only specifying endpoint uses NATS default scheme and port.
    nats.connect("demo.nats.io")

    # Setting custom server URI to connect.
    nats.connect("nats://localhost:4222")

    # Setting username and password to authenticate.
    nats.connect("nats://user:password@localhost:4222")

    # Using comma separated array to define list of servers.
    nats.connect("nats://localhost:4223,nats://localhost:4224")

    # Setting reconnect to false (options as the second argument)
    nats.connect("demo.nats.io:4222", reconnect: false)

    # Setting 'tls' as the scheme to use secure connection with defaults
    nats.connect("tls://demo.nats.io:4443")