You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, e.Message.Subject = "foo.inc" and globalRequestInbox = "_INBOX.OpwL1p-dK8wVoYOZ20GWIy"
Exception has occurred: CLR/System.ArgumentOutOfRangeException
Exception thrown: 'System.ArgumentOutOfRangeException' in System.Private.CoreLib.dll: 'startIndex cannot be larger than length of string.'
at System.String.Substring(Int32 startIndex, Int32 length)
at System.String.Substring(Int32 startIndex)
at NATS.Client.Connection.requestResponseHandler(Object sender, MsgHandlerEventArgs e)
Adding a minimal example for the issue.
Running on osx and using latest nats-server and jsm utility from source but had the same issue running the synadia/jsm:0.0.6 images in docker and NATS.Client 0.10.0
// # Start server// ./nats-server -js// test-jetstream % ./jsm str create// ? Stream Name foo// ? Subjects to consume foo.*// ? Storage backend memory// ? Retention Policy Limits// ? Message count limit -1// ? Message size limit -1// ? Maximum message age limit -1// ? Maximum individual message size -1// Stream foo was created// Information for Stream foo// Configuration:// Subjects: foo.*// Acknowledgements: true// Retention: Memory - Limits// Replicas: 1// Maximum Messages: -1// Maximum Bytes: -1// Maximum Age: 0s// Maximum Message Size: -1// Maximum Consumers: -1// State:// Messages: 0// Bytes: 0 B// FirstSeq: 0// LastSeq: 0// Active Consumers: 0// test-jetstream % ./jsm con create// ? Select a Stream foo// ? Consumer name bar// ? Delivery target// ? Start policy (all, last, 1h, msg sequence) all// ? Filter Stream by subject (blank for all)// ? Maximum Allowed Deliveries -1// Information for Consumer foo > bar// Configuration:// Durable Name: bar// Pull Mode: true// Deliver All: true// Ack Policy: explicit// Ack Wait: 30s// Replay Policy: instant// State:// Last Delivered Message: Consumer sequence: 0 Stream sequence: 0// Acknowledgment floor: Consumer sequence: 0 Stream sequence: 0// Pending Messages: 0// Redelivered Messages: 0usingSystem;usingSystem.Text;usingSystem.Threading.Tasks;usingNATS.Client;namespacesrc{publicclassProgram{publicstaticasyncTaskMain(string[]args){try{varoptions=ConnectionFactory.GetDefaultOptions();options.Url="nats://localhost:4222";// Works when set to true// options.UseOldRequestStyle = true;usingvarconnection=newConnectionFactory().CreateConnection(options);// Publish some data to streamconnection.Publish("foo.inc",Encoding.UTF8.GetBytes("Hello, World"));connection.Flush();// Try to read back one messagevarmsg=awaitconnection.RequestAsync("$JS.STREAM.foo.CONSUMER.bar.NEXT",Encoding.ASCII.GetBytes("1"));Console.WriteLine(Encoding.UTF8.GetString(msg.Data));}catch(Exceptionerr){Console.WriteLine(err.Message);}}}}
Trying out the new Jetstream server causes an issue with RequestAsync.
An exception is thrown when parsing the response
https://github.com/nats-io/nats.net/blob/3558232a673d65d4440050bb96492f2645f43892/src/NATS.Client/Conn.cs#L2597-L2605
Here,
e.Message.Subject = "foo.inc"
andglobalRequestInbox = "_INBOX.OpwL1p-dK8wVoYOZ20GWIy"
Adding a minimal example for the issue.
Running on osx and using latest nats-server and jsm utility from source but had the same issue running the
synadia/jsm:0.0.6
images in docker andNATS.Client 0.10.0
The text was updated successfully, but these errors were encountered: