Skip to content

Proposal: JetStream GetAutoAsync() and NatsStreamMsg<T> #1059

@mtmk

Description

@mtmk

Proposed change

It looks like we are not very helpful when it comes to retrieving messages from streams. A new type to encapsulate a message and metadata on top of two different ways of getting messages from a stream should help applications to access data more naturally.

On to of that we don't have a mechanism to get the message conveniently trying direct get first if allowed then falling back to stream get. This could be implemented as GetAutoAsync() on top of GetAsync() and GetDirectAsync().

Use case

Application needs access to stream messages without creating a consumer and wants to have a way to access message data in a strongly typed fashion.

Contribution

Suggestions welcome

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