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

jetstream examples should be merged #1319

Open
andrewgazelka opened this issue Sep 18, 2024 · 4 comments
Open

jetstream examples should be merged #1319

andrewgazelka opened this issue Sep 18, 2024 · 4 comments
Labels
docs Improvements or additions to documentation enhancement Enhancement to existing functionality

Comments

@andrewgazelka
Copy link

Observed behavior

https://github.com/nats-io/nats.rs/blob/main/async-nats/examples/jetstream_push.rs
https://github.com/nats-io/nats.rs/blob/main/async-nats/examples/jetstream_pull.rs

are pretty much identical (from what I can tell)

Expected behavior

do not have duplicate examples (you should just have one)

Server and client version

not relevant

Host environment

No response

Steps to reproduce

No response

@andrewgazelka andrewgazelka added the defect Suspected defect such as a bug or regression label Sep 18, 2024
@andrewgazelka
Copy link
Author

probably not a defect. However, I did not know what to put this as.

@Jarema Jarema added enhancement Enhancement to existing functionality and removed defect Suspected defect such as a bug or regression labels Sep 19, 2024
@caspervonb
Copy link
Collaborator

caspervonb commented Sep 19, 2024

Key difference is that they create different configs, e.g pull::Config vs push::Config, these give different implementations of the internals.

Pull example can probably be expanded to showcase fetch etc tho.

@andrewgazelka
Copy link
Author

Key difference is that they create different configs, e.g pull::Config vs push::Config, these give different implementations of the internals.

Pull example can probably be expanded to showcase fetch etc tho.

ah I see... yea was hard for me to tell that was the difference but perhaps I did not look hard enough. wonder if this can be emphasized somehow.

@caspervonb caspervonb added the docs Improvements or additions to documentation label Sep 19, 2024
@Jarema
Copy link
Member

Jarema commented Sep 23, 2024

I agree with both of you:

  1. We should add some comments.
  2. We should use pull-specific method too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation enhancement Enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants