Skip to content

Commit 3395cfd

Browse files
authored
chore(deps): bump pulsar from 5.1.1 to 6.0.0 (vectordotdev#17587)
- Bumps [pulsar](https://github.com/streamnative/pulsar-rs) from 5.1.1 to 6.0.0. - As part of this, a new config option for batch `max_bytes` is exposed for the sink.
1 parent 8549809 commit 3395cfd

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ paste = "1.0.12"
288288
percent-encoding = { version = "2.2.0", default-features = false }
289289
pin-project = { version = "1.1.0", default-features = false }
290290
postgres-openssl = { version = "0.5.0", default-features = false, features = ["runtime"], optional = true }
291-
pulsar = { version = "5.1.1", default-features = false, features = ["tokio-runtime", "auth-oauth2", "flate2", "lz4", "snap", "zstd"], optional = true }
291+
pulsar = { version = "6.0.0", default-features = false, features = ["tokio-runtime", "auth-oauth2", "flate2", "lz4", "snap", "zstd"], optional = true }
292292
rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
293293
rand_distr = { version = "0.4.3", default-features = false }
294294
rdkafka = { version = "0.31.0", default-features = false, features = ["tokio", "libz", "ssl", "zstd"], optional = true }

src/sinks/pulsar/config.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,17 @@ pub struct PulsarSinkConfig {
8787
#[configurable_component]
8888
#[derive(Clone, Copy, Debug, Default)]
8989
pub(crate) struct PulsarBatchConfig {
90-
/// The maximum size of a batch before it is flushed.
90+
/// The maximum amount of events in a batch before it is flushed.
9191
///
9292
/// Note this is an unsigned 32 bit integer which is a smaller capacity than
9393
/// many of the other sink batch settings.
9494
#[configurable(metadata(docs::type_unit = "events"))]
9595
#[configurable(metadata(docs::examples = 1000))]
9696
pub max_events: Option<u32>,
97+
98+
/// The maximum size of a batch before it is flushed.
99+
#[configurable(metadata(docs::type_unit = "bytes"))]
100+
pub max_bytes: Option<usize>,
97101
}
98102

99103
/// Authentication configuration.
@@ -235,6 +239,7 @@ impl PulsarSinkConfig {
235239
metadata: Default::default(),
236240
schema: None,
237241
batch_size: self.batch.max_events,
242+
batch_byte_size: self.batch.max_bytes,
238243
compression: None,
239244
};
240245

website/cue/reference/components/sinks/base/pulsar.cue

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,24 @@ base: components: sinks: pulsar: configuration: {
8686
batch: {
8787
description: "Event batching behavior."
8888
required: false
89-
type: object: options: max_events: {
90-
description: """
91-
The maximum size of a batch before it is flushed.
89+
type: object: options: {
90+
max_bytes: {
91+
description: "The maximum size of a batch before it is flushed."
92+
required: false
93+
type: uint: unit: "bytes"
94+
}
95+
max_events: {
96+
description: """
97+
The maximum amount of events in a batch before it is flushed.
9298
93-
Note this is an unsigned 32 bit integer which is a smaller capacity than
94-
many of the other sink batch settings.
95-
"""
96-
required: false
97-
type: uint: {
98-
examples: [1000]
99-
unit: "events"
99+
Note this is an unsigned 32 bit integer which is a smaller capacity than
100+
many of the other sink batch settings.
101+
"""
102+
required: false
103+
type: uint: {
104+
examples: [1000]
105+
unit: "events"
106+
}
100107
}
101108
}
102109
}

0 commit comments

Comments
 (0)