Skip to content

Commit 7efdb7d

Browse files
V VV V
authored andcommitted
upgrade: iggy 0.8.1-edge → 0.8.3-edge.1 (fixes missing_index 4033 error)
Root cause: Iggy server (edge release) requires message indexes that SDK 0.8.1 doesn't send. Restored background mode since the issue was purely version mismatch, not producer mode.
1 parent 64b9bce commit 7efdb7d

3 files changed

Lines changed: 23 additions & 148 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ axum = "0.8"
88
tokio = { version = "1", features = ["full"] }
99
serde = { version = "1", features = ["derive"] }
1010
serde_json = "1"
11-
iggy = "0.8.1-edge.1"
12-
iggy_common = "0.8.1-edge.2"
11+
iggy = "0.8.3-edge.1"
12+
iggy_common = "0.8.3-edge.1"
1313
uuid = { version = "1", features = ["v7"] }
1414
hmac = "0.12"
1515
sha2 = "0.10"

src/producer.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,18 @@ impl EventProducer {
120120
Err(_) => info!("Stream already exists: {}", stream_name),
121121
}
122122

123-
// Build the producer in DIRECT mode for reliable delivery.
124-
// Direct mode waits for Iggy confirmation on each send.
125-
// TODO: re-enable background mode after diagnosing silent flush failures.
123+
// Build the producer in BACKGROUND mode for maximum throughput.
124+
// Background mode uses sharded workers that batch messages and
125+
// flush them asynchronously — send() returns immediately.
126126
let producer = client
127127
.producer(stream_name, topic_name)?
128+
.background(
129+
BackgroundConfig::builder()
130+
.batch_length(1000)
131+
.linger_time(IggyDuration::from(1))
132+
.max_buffer_size(IggyByteSize::from(MAX_BUFFER_BYTES))
133+
.build(),
134+
)
128135
.partitioning(Partitioning::balanced())
129136
.create_topic_if_not_exists(
130137
partitions,

0 commit comments

Comments
 (0)