nats-io / nats.java

Java client for NATS
Apache License 2.0
563 stars 153 forks source link

UTF subject support #1169

Closed scottf closed 2 months ago

scottf commented 2 months ago

For https://github.com/nats-io/nats.java/issues/1143

This allows you to turn on UTF-8 support via the connect options with the supportUTF8Subjects builder method.

You can publish with a UTF-8 subject whether or not this flag is set, since all that happens outgoing is we convert strings to byte arrays using UTF-8 character encoding anyway.

But on incoming messages, it's a different code path to process messages that might expect a UTF-8 subject, so the option is required.