Skip to content

Commit

Permalink
fixed buffering triggers (#499)
Browse files Browse the repository at this point in the history
* [FIX] accounting for pull request messages was happening when the iterator executed, creating additional pulls on the next message to be processed.
[FIX] tagged consumers api as beta, deprecated legacy subscribes/fetch/etc.

* making test pass

* PR comments
  • Loading branch information
aricart committed May 2, 2023
1 parent 32e5d67 commit 888d04d
Show file tree
Hide file tree
Showing 7 changed files with 976 additions and 37 deletions.
15 changes: 15 additions & 0 deletions jetstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,21 @@ await js.publish("a.b", Empty, { expect: { lastSubjectSequence: pa.seq } });

### Processing Messages

Starting with nats-base-client (NBC) 1.14.0, a new API for consuming and
processing messages in JetStream is available in the JavaScript clients. The new
API is currently provided as a _preview_, and will deprecate previous JetStream
subscribe APIs as [_legacy_](./legacy_jetstream.md). It is encouraged to start
experimenting with the new APIs as soon as possible.

The new API:

- Streamlines consumer creation/updates only happen on JSM APIs (or via ordered
consumer operations)
- Consuming messages requires a consumer to already exist
- Adopts a "pull" consumer for all consumer operations, however messages are
presented to the client as if they were a "push" consumer.
-

Messages are processed by subscriptions to the stream. The JavaScript client
provides several ways a consumer can read its messages from a stream.

Expand Down
Loading

0 comments on commit 888d04d

Please sign in to comment.