Skip to content

Commit

Permalink
Fix README code
Browse files Browse the repository at this point in the history
  • Loading branch information
dx3mod committed Nov 4, 2024
1 parent 4807153 commit efd37d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ let main =
in
(* Publishes 'hello' message to three subjects. *)
Lwt_list.iter_p
Lwt_list.iter_s
(fun subject -> Nats_client_lwt.pub client ~subject "hello")
[ "greet.sue"; "greet.bob"; "greet.pam" ];%lwt
Expand All @@ -66,6 +66,12 @@ $ docker start -a nats-server
$ dune exec ./examples/natsbyexample/publish_subscribe.exe
```

```
'hello' received on greet.sue
'hello' received on greet.bob
'hello' received on greet.pam
```

## References

- [NATS documentation](https://docs.nats.io/)
Expand Down
2 changes: 1 addition & 1 deletion examples/natsbyexample/publish_subscribe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let main =
in

(* Publishes 'hello' message to three subjects. *)
Lwt_list.iter_p
Lwt_list.iter_s
(fun subject -> Nats_client_lwt.pub client ~subject "hello")
[ "greet.sue"; "greet.bob"; "greet.pam" ];%lwt

Expand Down

0 comments on commit efd37d5

Please sign in to comment.