Skip to content

Commit

Permalink
fix: Examples not producing output on consumer side (streamnative#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaigalos authored Mar 1, 2023
1 parent c5c05cc commit bcfa020
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Examples

In order to run these examples, you will need a running Apache-Pulsar backend. You can start one with:

```bash
docker run -it \
-p 6650:6650 \
-p 8080:8080 \
--mount source=pulsardata,target=/pulsar/data \
--mount source=pulsarconf,target=/pulsar/conf \
apachepulsar/pulsar:2.10.0 \
bin/pulsar standalone
```

## Producer

```bash
RUST_LOG=info cargo run --release --example producer
```

## Consumer

```bash
RUST_LOG=info cargo run --release --example consumer
```
2 changes: 1 addition & 1 deletion examples/producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async fn main() -> Result<(), pulsar::Error> {
.unwrap();

counter += 1;
println!("{counter} messages");
log::info!("{counter} messages");
tokio::time::sleep(std::time::Duration::from_millis(1000)).await;

if counter > 10 {
Expand Down

0 comments on commit bcfa020

Please sign in to comment.