Skip to content

Commit

Permalink
documentation update (#221)
Browse files Browse the repository at this point in the history
Updated said files:
mqtt.mdx
- inclusion of downloading the mqtt ipkg
deduplication.mdx
lookback.mdx
- updated smdk generation output
- fixed topic name syntax
  • Loading branch information
ZeroNerodaHero authored Aug 23, 2024
1 parent 5ef803f commit e2681af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion docs/hub/connectors/inbound/mqtt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ mqtt:
Run connector locally using `cdk` tool (from root directory or any sub-directory):

```bash
cdk deploy start --config sample-config.yaml
cdk hub download infinyon/mqtt-source@x.y.z
cdk deploy start --config sample-config.yaml --ipkg infinyon/mqtt-source@x.y.z
cdk deploy list # to see the status
cdk deploy log my-mqtt-connector # to see connector's logs
Expand Down
2 changes: 1 addition & 1 deletion docs/smartmodules/features/deduplication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ deduplication:
age: 5s # remember records for at least 5 seconds
filter:
transform:
uses: infinyon-labs/dedup-filter@0.0.2
uses: infinyon-labs/dedup-filter@x.y.z
```
A topic can be created using this config file like so:
Expand Down
20 changes: 12 additions & 8 deletions docs/smartmodules/features/lookback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,17 @@ First, let's generate a new SmartModule using SMDK tool:

```bash copy="fl"
$ smdk generate
Using hub https://hub-dev.infinyon.cloud
🤷 Project Name: filter-with-lookback
🤷 Will your SmartModule be public? · false
🤷 Please set a group name: local
✔ 🤷 Which type of SmartModule would you like? · filter
✔ 🤷 Will your SmartModule use init parameters? · false
✔ 🤷 Will your SmartModule be public? · false
[1/7] Done: .gitignore
[2/7] Done: Cargo.toml
[3/7] Done: README.md
[4/7] Done: SmartModule.toml
[5/7] Done: rust-toolchain.toml
[6/7] Done: src/lib.rs
[7/7] Done: src
[4/7] Done: SmartModule.toml
[5/7] Done: rust-toolchain.toml [6/7] Done: src/lib.rs
[7/7] Done: src
```
Then, put the code snippet from above into `src/lib.rs` file.

Expand All @@ -110,11 +109,16 @@ $ smdk build
$ smdk load
```

Create a topic
```bash copy="fl"
$ smdk test-topic
```

Let's produce 3 records into our topic:


```bash copy="fl"
$ fluvio produce test_topic
$ fluvio produce test-topic
> 1
Ok!
> 2
Expand All @@ -127,7 +131,7 @@ In another terminal, run Fluvio Consumer with `transforms.yaml` file from the ex


```bash copy="fl"
$ fluvio consume test_topic --transforms-file transforms.yaml
$ fluvio consume test-topic --transforms-file transforms.yaml
```

If you insert another record in Producer, Consumer will only output it only if it's greater than 3 (last record value when Consumer started).
Expand Down

0 comments on commit e2681af

Please sign in to comment.