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

[ADDED] JetStream: Direct Get Message #562

Merged
merged 1 commit into from
Jul 20, 2022
Merged

[ADDED] JetStream: Direct Get Message #562

merged 1 commit into from
Jul 20, 2022

Commits on Jul 20, 2022

  1. [ADDED] JetStream: Direct message get

    This starts with a new boolean in a stream configuration:
    ```
    // Allow higher performance, direct access to get individual messages. E.g. KeyValue
    bool  AllowDirect;
    ```
    
    When a stream is created with that boolean, then it is possible
    to use this API to get messages:
    ```
    natsStatus
    js_DirectGetMsg(natsMsg **msg, jsCtx *js, const char *stream, jsOptions *opts, jsDirectGetMsgOptions *dgOpts);
    ```
    
    The possible options to get a message are:
    ```
    typedef struct jsDirectGetMsgOptions
    {
            uint64_t        Sequence;               ///< Get the message at this sequence
            const char      *NextBySubject;         ///< Get the next message (based on sequence) for that subject
            const char      *LastBySubject;         ///< Get the last message on that subject
    
    } jsDirectGetMsgOptions;
    ```
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    482bee4 View commit details
    Browse the repository at this point in the history