Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js_DirectGetMsg return NATS_TIMEOUT #575

Closed
danakeydar opened this issue Aug 23, 2022 · 3 comments · Fixed by #577
Closed

js_DirectGetMsg return NATS_TIMEOUT #575

danakeydar opened this issue Aug 23, 2022 · 3 comments · Fixed by #577

Comments

@danakeydar
Copy link

danakeydar commented Aug 23, 2022

Hi,
I'm using JetStream and trying to use js_DirectGetMsg.
I have a stream 'Jobs' that was created with the flag AllowDirect=true.

The API call is '$JS.API.DIRECT.GET.Jobs' and i'm getting NATS_TIMEOUT error.

jsDirectGetMsgOptions getMsgOpts;
jsDirectGetMsgOptions_Init(&getMsgOpts);
getMsgOpts.Sequence = 3;

natsMsg* msg;
s = js_DirectGetMsg(&msg, js, "Jobs", &jsOpts, &getMsgOpts);

(I'm using the 'js','jsOpts' objects in other successful calls)

When running the "nats stream get Jobs 3" command in nats CLI I get the message.

Any help?

@kozlovic
Copy link
Member

@danakeydar Would you please let me know which version of the server are you using? If a nightly or built from source, would you mind posting the commit rev number?

@danakeydar
Copy link
Author

@kozlovic Sure, I'm using the latest release version 2.8.4.

@kozlovic
Copy link
Member

@danakeydar That explains it. This feature will be available only in the v2.9.0 release (that you can try from NATS Server repo main branch or from the nightlies). I will add that information in the js_DirectGetMsg() doc.

kozlovic added a commit that referenced this issue Aug 24, 2022
[ci skip]

Resolves #575

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants