Skip to content

Generic exception is thrown when publishing a JetStream message #768

@joschiwald

Description

@joschiwald

Better identify JetStream connection and /communication errors.

Versions of io.nats:jnats and nats-server:

io.nats:jnats: 2.16.1
nats-server: 2.8.4

OS/Container environment:

Client: Windows 10
Server: alpine docker image

Steps or code to reproduce the issue:

  1. Start a nats-server with default configuration and no streams configured
  2. Publish a JetStream message
natsConn.jetStream().publish("test", myMessageBytes)

Expected result:

The publish function throws a JetStreamApiException with the right error code.

Actual result:

The publish function throws an IOException
https://github.com/nats-io/nats.java/blob/main/src/main/java/io/nats/client/impl/NatsJetStream.java#L153

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions