docs: add jetstream desc and benthos example

This commit is contained in:
Mohamed Sohail 2023-01-16 11:00:43 +00:00
parent e1c9faa7d0
commit c138c95583
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D

View File

@ -25,6 +25,28 @@ Processes a transaction and passes it on to the next filter or terminates the pi
- Fetches a block (and some of its header details), transactions and transaction receipts embedded within the transaction object in a single call.
### NATS JetStream
- The final filter will emit an event to JetStream.
To view/debug the JetStream messages, you can use [Benthos](https://benthos.dev)
With a config like:
```yaml
input:
label: jetstream
nats_jetstream:
urls:
- nats://127.0.0.1:4222
subject: "CHAIN.*"
durable: benthos
deliver: all
output:
stdout:
codec: lines
```
## Caveats
- Blocks are not guaranteed to be processed in order, however a low concurrency setting would somewhat give an "in-order" behaviour (not to be relied upon in any case).