Skip to content

Commit 783eb68

Browse files
authored
chore: release fluvio 0.17.0 (#390)
1 parent dbd21b6 commit 783eb68

File tree

224 files changed

+18586
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+18586
-4
lines changed

Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ lint: build
4747

4848

4949
resync-ver:
50-
rm -rf versioned_docs/version-0.16.1
51-
rsync -aurv docs/ versioned_docs/version-0.16.1
50+
rm -rf versioned_docs/version-0.17.0
51+
rsync -aurv docs/ versioned_docs/version-0.17.0
5252

5353
sync-ver:
54-
rsync -aurv docs/ versioned_docs/version-0.16.1
54+
rsync -aurv docs/ versioned_docs/version-0.17.0

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import sdfVersionsList from "./sdf_versions.json" with { type: "json" };
99

1010
const FLUVIO_REPOSITORY_URL = "https://github.com/InfinyOn/fluvio";
1111

12-
const STABLE_VERSION = "0.16.1";
12+
const STABLE_VERSION = "0.17.0";
1313

1414
// read sdf-versions.json and build versions object
1515
const sdfVersions = sdfVersionsList.reduce((acc, version) => ({

news/this-week-in-fluvio-0073.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: "This Week in Fluvio #73"
3+
date: 2025-04-03
4+
weight: 20
5+
---
6+
Fluvio is a distributed, programmable streaming platform written in Rust.
7+
8+
---
9+
We released **Fluvio 0.17.0** last week.
10+
11+
## New release
12+
Fluvio **v0.17.0** is now available!
13+
14+
To update you can run `fvm update`
15+
16+
```bash
17+
$ fvm update
18+
19+
info: Updating fluvio stable to version 0.17.0. Current version is 0.16.1.
20+
info: Downloading (1/5): fluvio@0.17.0
21+
info: Downloading (2/5): fluvio-cloud@0.3.8
22+
info: Downloading (3/5): fluvio-run@0.17.0
23+
info: Downloading (4/5): cdk@0.17.0
24+
info: Downloading (5/5): smdk@0.17.0
25+
done: Installed fluvio version 0.17.0
26+
done: Now using fluvio version 0.17.0
27+
28+
```
29+
30+
If you don't have Fluvio in your machine run:
31+
32+
```
33+
curl -fsS https://hub.infinyon.cloud/install/install.sh | bash
34+
```
35+
36+
If you are enjoying Fluvio please share with your friends!
37+
38+
:::info
39+
Also check out the Stateful Data Flow (SDF) streaming analytics in beta [SDF Examples](https://github.com/infinyon/stateful-dataflows-examples)
40+
:::
41+
42+
## New features & Improvements
43+
This release includes several notable enhancements and fixes:
44+
45+
- Fixed issues where replication could get stuck when syncing large batches.
46+
- Enabled producer reconnection when an SPU goes down.
47+
- Automatically deleted consumers after their topic is removed.
48+
- Added proxy support for `fvm install`.
49+
- Improved `cdk publish` with additional validations.
50+
- Recalculated replicas on timeout and rejection scenarios.
51+
- Returned a TLS cluster connection error when built without TLS.
52+
- SPG creation is optional now.
53+
- Added `dedup` parameter to the CLI for topic creation. Example: `fluvio topic create TOPIC_NAME --dedup --dedup-count 1000 --dedup-age 10m`
54+
55+
56+
See the [CHANGELOG] for details
57+
58+
## Good First Issues
59+
We love our open source community contributors. Here are some issues that you could contribute to. All the best.
60+
61+
- [Improve fluvio topic describe with additional information]
62+
- [Different default SPU port]
63+
- [Remove localhost from fluvio in favor of 127.0.0.1]
64+
- [When a topic is deleted, connected clients should have their connection closed]
65+
66+
67+
---
68+
69+
Get in touch with us on [GitHub Discussions] or join [our Discord channel] and come say hello!
70+
71+
See some of the interesting community projects, examples, and utilities in the [Fluvio Community] GitHub org.
72+
73+
74+
For the full list of changes this week, be sure to check out [our CHANGELOG].
75+
76+
[Fluvio open source]: https://github.com/infinyon/fluvio
77+
[our CHANGELOG]: https://github.com/infinyon/fluvio/blob/master/CHANGELOG.md
78+
[our Discord channel]: https://discordapp.com/invite/bBG2dTz
79+
[GitHub Discussions]: https://github.com/infinyon/fluvio/discussions
80+
81+
[this form]: https://infinyon.com/request/ss-early-access/
82+
[CHANGELOG]: https://github.com/infinyon/fluvio/blob/v0.17.0/CHANGELOG.md
83+
[When a topic is deleted, connected clients should have their connection closed]: https://github.com/infinyon/fluvio/issues/3836
84+
[Remove localhost from fluvio in favor of 127.0.0.1]: https://github.com/infinyon/fluvio/issues/3866
85+
[Improve fluvio topic describe with additional information]: https://github.com/infinyon/fluvio/issues/3968
86+
[Different default SPU port]: https://github.com/infinyon/fluvio/issues/3739
87+
[Fluvio Community]: https://github.com/fluvio-community
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
edition = "2021"
3+
name = "fluvio-rust-example"
4+
publish = false
5+
version = "0.0.0"
6+
7+
[dependencies]
8+
async-std = {version = "1", features = ["attributes"]}
9+
chrono = "0.4"
10+
flate2 = "1.0.35"
11+
fluvio = "0.24.4"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fluvio = "0.24.4"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
use async_std::stream::StreamExt;
2+
3+
use fluvio::{
4+
consumer::{ConsumerConfigExtBuilder, OffsetManagementStrategy},
5+
Fluvio, Offset,
6+
};
7+
8+
const TOPIC_NAME: &str = "hello-rust";
9+
const PARTITION_NUM: u32 = 0;
10+
const CONSUMER_OFFSET: &str = "consumer-auto";
11+
12+
#[async_std::main]
13+
async fn main() {
14+
// Connect to Fluvio cluster
15+
let fluvio = Fluvio::connect().await.expect("Failed to connect to Fluvio");
16+
17+
// Consume last record from topic
18+
let config = ConsumerConfigExtBuilder::default()
19+
.topic(TOPIC_NAME)
20+
.partition(PARTITION_NUM)
21+
.offset_start(Offset::end())
22+
.offset_consumer(CONSUMER_OFFSET.to_string())
23+
.offset_strategy(OffsetManagementStrategy::Auto)
24+
.build()
25+
.expect("Failed to build consumer config");
26+
27+
28+
// Create consumer & stream one record
29+
let mut stream = fluvio.consumer_with_config(config).await
30+
.expect("Failed to create consumer");
31+
while let Some(Ok(record)) = stream.next().await {
32+
let string = String::from_utf8_lossy(record.value());
33+
println!("{}", string);
34+
}
35+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
use async_std::stream::StreamExt;
2+
3+
use fluvio::{
4+
consumer::{ConsumerConfigExtBuilder, ConsumerStream, OffsetManagementStrategy},
5+
Fluvio, Offset,
6+
};
7+
8+
const TOPIC_NAME: &str = "hello-rust";
9+
const PARTITION_NUM: u32 = 0;
10+
const CONSUMER_OFFSET: &str = "consumer-manual";
11+
12+
#[async_std::main]
13+
async fn main() {
14+
// Connect to Fluvio cluster
15+
let fluvio = Fluvio::connect().await.expect("Failed to connect to Fluvio");
16+
17+
// Consume last record from topic
18+
let config = ConsumerConfigExtBuilder::default()
19+
.topic(TOPIC_NAME)
20+
.partition(PARTITION_NUM)
21+
.offset_start(Offset::end())
22+
.offset_consumer(CONSUMER_OFFSET.to_string())
23+
.offset_strategy(OffsetManagementStrategy::Manual)
24+
.build()
25+
.expect("Failed to build consumer config");
26+
27+
28+
// Create consumer & stream one record
29+
let mut stream = fluvio.consumer_with_config(config).await.expect("Failed to create consumer");
30+
while let Some(Ok(record)) = stream.next().await {
31+
let string = String::from_utf8_lossy(record.value());
32+
println!("{}", string);
33+
stream.offset_commit().expect("offset commit failed");
34+
stream.offset_flush().await.expect("offset flush failed");
35+
}
36+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
use async_std::stream::StreamExt;
2+
3+
use fluvio::{consumer::ConsumerConfigExtBuilder, Fluvio, Offset};
4+
5+
const TOPIC_NAME: &str = "hello-rust";
6+
const PARTITION_NUM: u32 = 0;
7+
8+
#[async_std::main]
9+
async fn main() {
10+
// Connect to Fluvio cluster
11+
let fluvio = Fluvio::connect().await.expect("Failed to connect to Fluvio");
12+
13+
// Consume last record from topic
14+
let config = ConsumerConfigExtBuilder::default()
15+
.topic(TOPIC_NAME)
16+
.partition(PARTITION_NUM)
17+
.offset_start(Offset::from_end(1))
18+
.build()
19+
.expect("Failed to build consumer config");
20+
21+
// Create consumer & stream one record
22+
let mut stream = fluvio.consumer_with_config(config).await
23+
.expect("Failed to create consumer");
24+
if let Some(Ok(record)) = stream.next().await {
25+
let string = String::from_utf8_lossy(record.value());
26+
println!("{}", string);
27+
}
28+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
use std::io::Read;
2+
use std::collections::BTreeMap;
3+
use async_std::stream::StreamExt;
4+
use flate2::{bufread::GzEncoder, Compression};
5+
6+
use fluvio::{Fluvio, Offset, SmartModuleExtraParams};
7+
use fluvio::consumer::{
8+
ConsumerConfigExtBuilder,
9+
SmartModuleInvocation,
10+
SmartModuleInvocationWasm,
11+
SmartModuleKind,
12+
};
13+
14+
const TOPIC_NAME: &str = "hello-rust";
15+
const PARTITION_NUM: u32 = 0;
16+
17+
#[async_std::main]
18+
async fn main() {
19+
// Connect to Fluvio cluster
20+
let fluvio = Fluvio::connect().await.expect("Failed to connect to Fluvio");
21+
22+
// Build smartmodule invocation from wasm file
23+
let sm_invocation = build_smartmodule_from_file(
24+
SmartModuleKind::Map,
25+
"regex_text.wasm",
26+
r#"[{"replace": {"regex": "secret", "with": "****"}}]"#,
27+
);
28+
29+
// Consume last record from topic
30+
let config = ConsumerConfigExtBuilder::default()
31+
.topic(TOPIC_NAME)
32+
.partition(PARTITION_NUM)
33+
.offset_start(Offset::end())
34+
.smartmodule(vec![sm_invocation])
35+
.build()
36+
.expect("Failed to build consumer config");
37+
38+
// Create consumer & stream one record
39+
let mut stream = fluvio.consumer_with_config(config).await.expect("Failed to create consumer");
40+
if let Some(Ok(record)) = stream.next().await {
41+
let string = String::from_utf8_lossy(record.value());
42+
println!("{}", string);
43+
}
44+
}
45+
46+
// Create a smartmodule invocation from a wasm file
47+
fn build_smartmodule_from_file(
48+
kind: SmartModuleKind,
49+
file_path: &str,
50+
spec: &str
51+
) -> SmartModuleInvocation {
52+
// Read smartmodule wasm file
53+
let raw_buffer = std::fs::read(file_path).expect("wasm file is missing");
54+
let mut encoder = GzEncoder::new(raw_buffer.as_slice(), Compression::default());
55+
let mut buffer = Vec::with_capacity(raw_buffer.len());
56+
encoder.read_to_end(&mut buffer).expect("failed to read encoded wasm file");
57+
58+
// Create smartmodule invocation with params
59+
let mut param_tree = BTreeMap::<String,String>::new();
60+
param_tree.insert("spec".to_owned(), spec.to_owned());
61+
let params = SmartModuleExtraParams::new(param_tree, None);
62+
63+
// Return smartmodule invocation
64+
SmartModuleInvocation {
65+
wasm: SmartModuleInvocationWasm::AdHoc(buffer),
66+
kind: kind,
67+
params: params,
68+
}
69+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
use std::collections::BTreeMap;
2+
use async_std::stream::StreamExt;
3+
4+
use fluvio::{Fluvio, Offset, SmartModuleExtraParams};
5+
use fluvio::consumer::{
6+
ConsumerConfigExtBuilder,
7+
SmartModuleInvocation,
8+
SmartModuleInvocationWasm,
9+
SmartModuleKind,
10+
};
11+
12+
const TOPIC_NAME: &str = "hello-rust";
13+
const PARTITION_NUM: u32 = 0;
14+
15+
#[async_std::main]
16+
async fn main() {
17+
// Connect to Fluvio cluster
18+
let fluvio = Fluvio::connect().await.expect("Failed to connect to Fluvio");
19+
20+
// Build smartmodule invocation from wasm file
21+
let sm_invocation = build_smartmodule_from_name(
22+
SmartModuleKind::Map,
23+
"fluvio/regex-text@0.1.0",
24+
r#"[{"replace": {"regex": "secret", "with": "****"}}]"#,
25+
);
26+
27+
// Consume last record from topic
28+
let config = ConsumerConfigExtBuilder::default()
29+
.topic(TOPIC_NAME)
30+
.partition(PARTITION_NUM)
31+
.offset_start(Offset::end())
32+
.smartmodule(vec![sm_invocation])
33+
.build()
34+
.expect("Failed to build consumer config");
35+
36+
// Create consumer & stream one record
37+
let mut stream = fluvio.consumer_with_config(config).await.expect("Failed to create consumer");
38+
if let Some(Ok(record)) = stream.next().await {
39+
let string = String::from_utf8_lossy(record.value());
40+
println!("{}", string);
41+
}
42+
}
43+
44+
// Create a smartmodule invocation using smartmodule name
45+
fn build_smartmodule_from_name(
46+
kind: SmartModuleKind,
47+
smartmodule_name: &str,
48+
spec: &str
49+
) -> SmartModuleInvocation {
50+
// Create smartmodule invocation with params
51+
let mut param_tree = BTreeMap::<String,String>::new();
52+
param_tree.insert("spec".to_owned(), spec.to_owned());
53+
let params = SmartModuleExtraParams::new(param_tree, None);
54+
55+
// Return smartmodule invocation
56+
SmartModuleInvocation {
57+
wasm: SmartModuleInvocationWasm::Predefined(smartmodule_name.to_string()),
58+
kind: kind,
59+
params: params,
60+
}
61+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use fluvio::metadata::topic::TopicSpec;
2+
use fluvio::Fluvio;
3+
4+
const TOPIC_NAME: &str = "hello-rust";
5+
const PARTITIONS: u32 = 1;
6+
const REPLICAS: u32 = 1;
7+
8+
#[async_std::main]
9+
async fn main() {
10+
// Connect to Fluvio cluster
11+
let fluvio = Fluvio::connect().await.expect("Failed to connect to Fluvio");
12+
13+
// Create a topic
14+
let admin = fluvio.admin().await;
15+
let topic_spec = TopicSpec::new_computed(PARTITIONS, REPLICAS, None);
16+
let _topic_create = admin
17+
.create(TOPIC_NAME.to_string(), false, topic_spec)
18+
.await;
19+
20+
// List topics
21+
let topics = admin.all::<TopicSpec>().await.expect("Failed to list topics");
22+
let topic_names = topics.iter().map(|topic| topic.name.clone()).collect::<Vec<String>>();
23+
24+
println!("Topics:\n - {}", topic_names.join("\n - "));
25+
}

0 commit comments

Comments
 (0)