Skip to content

Commit

Permalink
Remove subject transform dest field
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <[email protected]>
  • Loading branch information
Jarema committed Sep 20, 2023
1 parent fe79b4d commit 98fd93a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 0 additions & 8 deletions async-nats/src/jetstream/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1461,14 +1461,6 @@ pub struct Source {
/// Optional config to set a domain, if source is residing in different one.
#[serde(default, skip_serializing_if = "is_default")]
pub domain: Option<String>,
/// Optional config to set the subject transform destination
#[cfg(feature = "server_2_10")]
#[serde(
default,
rename = "subject_transform_dest",
skip_serializing_if = "is_default"
)]
pub subject_transform_destination: Option<String>,
/// Subject transforms for Stream.
#[cfg(feature = "server_2_10")]
#[serde(default, skip_serializing_if = "is_default")]
Expand Down
8 changes: 6 additions & 2 deletions async-nats/tests/jetstream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,6 @@ mod jetstream {
let source = stream::Source {
name: "source".to_string(),
filter_subject: Some("stream1.foo".to_string()),
subject_transform_destination: Some("foo".to_string()),
..Default::default()
};

Expand Down Expand Up @@ -3225,6 +3224,8 @@ mod jetstream {
#[cfg(feature = "server_2_10")]
#[tokio::test]
async fn subject_transform() {
use async_nats::jetstream::stream::SubjectTransform;

let server = nats_server::run_server("tests/configs/jetstream.conf");
let client = async_nats::connect(server.client_url()).await.unwrap();
let context = async_nats::jetstream::new(client.clone());
Expand Down Expand Up @@ -3254,7 +3255,10 @@ mod jetstream {
name: "sourcing".to_string(),
sources: Some(vec![async_nats::jetstream::stream::Source {
name: "origin".to_string(),
subject_transform_destination: Some("fromtest.>".to_string()),
subject_transforms: vec![SubjectTransform {
source: ">".to_string(),
destination: "fromtest.>".to_string(),
}],
..Default::default()
}]),
..Default::default()
Expand Down

0 comments on commit 98fd93a

Please sign in to comment.