Skip to content

Commit

Permalink
fix(stream): remove useless stream in nats sink (#12107)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufansong authored Sep 6, 2023
1 parent 68087f3 commit b3a4195
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/connector/src/sink/nats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::collections::HashMap;

use anyhow::anyhow;
use async_nats::jetstream::context::Context;
use async_nats::jetstream::stream::Stream;
use risingwave_common::array::StreamChunk;
use risingwave_common::buffer::Bitmap;
use risingwave_common::catalog::Schema;
Expand Down Expand Up @@ -54,7 +53,6 @@ pub struct NatsSink {
pub struct NatsSinkWriter {
pub config: NatsConfig,
context: Context,
stream: Stream,
schema: Schema,
}

Expand Down Expand Up @@ -118,15 +116,9 @@ impl NatsSinkWriter {
.build_context()
.await
.map_err(|e| SinkError::Nats(anyhow_error!("nats sink error: {:?}", e)))?;
let stream = config
.common
.build_or_get_stream(context.clone())
.await
.map_err(|e| SinkError::Nats(anyhow_error!("nats sink error: {:?}", e)))?;
Ok::<_, SinkError>(Self {
config: config.clone(),
context,
stream,
schema: schema.clone(),
})
}
Expand Down

0 comments on commit b3a4195

Please sign in to comment.