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

Small improvements README.md #977

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ The Java NATS library provides two mechanisms to listen for messages, three if y

## JetStream

Publishing and subscribing to JetStream enabled servers is straightforward. A
JetStream enabled application will connect to a server, establish a JetStream
Publishing and subscribing to JetStream-enabled servers is straightforward. A
JetStream-enabled application will connect to a server, establish a JetStream
context, and then publish or subscribe. This can be mixed and matched with standard
NATS subject, and JetStream subscribers, depending on configuration, receive messages
from both streams and directly from other NATS producers.
Expand Down Expand Up @@ -769,12 +769,12 @@ in the JetStream examples for a detailed and runnable example.
**Iterate:**

```java
Iterator<Message> iter = sub.iterate(100, Duration.ofSeconds(1));
while (iter.hasNext()) {
Message m = iter.next();
// process message
m.ack();
}
Iterator<Message> iter = sub.iterate(100, Duration.ofSeconds(1));
while (iter.hasNext()) {
Message m = iter.next();
// process message
m.ack();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this is indented is intentional and matches the other indentation in the page. You can see that in the Fetch example just prior to this example. Please remove this change and I will accept the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see.
Fixed

```

The iterate method is a *macro* pull that uses advanced pulls under the covers to return an iterator.
Expand Down