### Run Price Feed Example Source: https://github.com/seaql/sea-streamer/blob/main/examples/price-feed/README.md Execute the Rust project to start the price feed listener and streamer. ```sh cargo run ``` -------------------------------- ### Buffered Processor Example with Clock Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md Illustrates running the buffered processor with a clock. This setup is beneficial when the input stream is high-frequency but the processor has high impedance, allowing for efficient batch processing. ```bash alias clock='cargo run --package sea-streamer-stdio --features=executables --bin clock' clock -- --stream clock --interval 100ms | \ cargo run --bin buffered -- --input stdio:///clock --output stdio:///output ``` -------------------------------- ### Start Iggy Server with Docker Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-iggy/README.md Starts an Iggy server instance using Docker. Ensure the necessary ports and configurations are exposed. ```bash docker run -d -p 8090:8090 \ --cap-add=SYS_NICE \ --security-opt seccomp=unconfined \ --ulimit memlock=-1:-1 \ -e IGGY_ROOT_USERNAME=iggy \ -e IGGY_ROOT_PASSWORD=iggy \ -e IGGY_TCP_ENABLED=true \ -e IGGY_TCP_ADDRESS=0.0.0.0:8090 \ -e IGGY_SYSTEM_SHARDING_CPU_ALLOCATION=1 \ apache/iggy:latest ``` -------------------------------- ### Install redis-streams-dump Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-redis/redis-streams-dump/README.md Install the utility globally using cargo. ```sh cargo install redis-streams-dump ``` -------------------------------- ### Install ss-decode Utility Source: https://github.com/seaql/sea-streamer/blob/main/README.md Installs the `sea-streamer-file` executable. Use this command to install the `ss-decode` utility globally. ```sh cargo install sea-streamer-file --features=executables --bin ss-decode ``` -------------------------------- ### Run SeaORM Data Sink Example Source: https://github.com/seaql/sea-streamer/blob/main/examples/sea-orm-sink/README.md Execute the SeaORM data sink example using Cargo. Ensure RUST_LOG is set to 'info' for detailed logging. ```sh RUST_LOG=info cargo run ``` -------------------------------- ### Run Resumable Processor Example Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md Demonstrates how to run the resumable processor. This processor ensures at-least-once processing, allowing it to resume from where it left off if killed. It's useful for scenarios where no messages should be skipped, though duplicate processing is possible. ```bash STREAMER_URI="kafka://localhost:9092" STREAMER_URI="redis://localhost:6379" # Produce lots of input cargo run --bin producer -- --stream $STREAMER_URI/hello1 # Run the processor, but kill it before it can process the entire stream cargo run --bin resumable -- --input $STREAMER_URI/hello1 --output stdio:///hello2 | head -n 10 cargo run --bin resumable -- --input $STREAMER_URI/hello1 --output stdio:///hello2 | head -n 10 cargo run --bin resumable -- --input $STREAMER_URI/hello1 --output stdio:///hello2 | head -n 10 ``` -------------------------------- ### Start Redis Instance with Docker Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-redis/README.md Quickly start a Redis instance for development or testing using Docker. This command runs Redis in detached mode, removes the container when it stops, and maps the default Redis port to your host machine. ```sh docker run -d --rm --name redis -p 6379:6379 redis ``` -------------------------------- ### Blocking Processor Example Output Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md This is the expected output from the blocking processor example, showing processed ticks with their associated thread. ```log [2023-03-07T06:00:52 | output | 0] [thread 0] { "tick": 0 } processed [2023-03-07T06:00:53 | output | 1] [thread 1] { "tick": 1 } processed [2023-03-07T06:00:53 | output | 2] [thread 2] { "tick": 2 } processed [2023-03-07T06:00:53 | output | 3] [thread 3] { "tick": 3 } processed [2023-03-07T06:00:54 | output | 4] [thread 0] { "tick": 4 } processed [2023-03-07T06:00:54 | output | 5] [thread 1] { "tick": 5 } processed [2023-03-07T06:00:54 | output | 6] [thread 2] { "tick": 6 } processed ``` -------------------------------- ### Setup Clock and Relay Programs Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Aliases for setting up the 'clock' and 'relay' CLI programs. The 'clock' program generates messages, and 'relay' redirects messages between inputs and outputs. ```shell # The `clock` program generate messages in the form of `{ "tick": N }` alias clock='cargo run --package sea-streamer-stdio --features=executables --bin clock' # The `relay` program redirect messages from `input` to `output` alias relay='cargo run --package sea-streamer-socket --features=executables,backend-kafka,backend-redis --bin relay' ``` -------------------------------- ### Run Producer, Processor, and Consumer with Redis/Kafka Source: https://github.com/seaql/sea-streamer/blob/main/README.md This shell command sequence demonstrates how to run the producer, processor, and consumer applications using Redis or Kafka as the stream backend. It includes starting processes in the background and stopping them. ```shell STREAMER_URI="redis://localhost:6379" # or STREAMER_URI="kafka://localhost:9092" # Produce some input cargo run --bin producer -- --stream $STREAMER_URI/hello1 & # Start the processor, producing some output cargo run --bin processor -- --input $STREAMER_URI/hello1 --output $STREAMER_URI/hello2 & # Replay the output cargo run --bin consumer -- --stream $STREAMER_URI/hello2 # Remember to stop the processes kill %1 %2 ``` -------------------------------- ### Install ss-decode Utility Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-file/README.md Installs the `ss-decode` command-line utility for inspecting SeaStreamer files. This utility can be used to decode `.ss` files with specified formats. ```sh cargo install sea-streamer-file --features=executables --bin ss-decode # local version alias ss-decode='cargo run --package sea-streamer-file --features=executables --bin ss-decode' ``` -------------------------------- ### Log Format Example Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-file/README.md An example of the log format used by `ss-decode` when processing a SeaStreamer file. It includes a header with stream information and the message payload. ```log # header [2023-06-05T13:55:53.001 | hello | 1 | 0] message-1 # beacon ``` -------------------------------- ### Run Blocking Processor Example Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md This command sets up a clock process that sends ticks to a blocking processor. The blocking processor then consumes these ticks and outputs them. This pattern is useful for handling blocking I/O or CPU-intensive tasks. ```bash alias clock='cargo run --package sea-streamer-stdio --features=executables --bin clock' clock -- --stream clock --interval 333ms | \ cargo run --bin blocking -- --input stdio:///clock --output stdio:///output ``` -------------------------------- ### Basic Stream Consumer Example Source: https://github.com/seaql/sea-streamer/blob/main/README.md This Rust code demonstrates a basic stream consumer. It connects to a stream, sets consumer options including auto stream reset to earliest, and continuously fetches and prints messages. ```rust #[tokio::main] async fn main() -> Result<()> { env_logger::init(); let Args { stream } = Args::parse(); let streamer = SeaStreamer::connect(stream.streamer(), Default::default()).await?; let mut options = SeaConsumerOptions::new(ConsumerMode::RealTime); options.set_auto_stream_reset(SeaStreamReset::Earliest); let consumer: SeaConsumer = streamer .create_consumer(stream.stream_keys(), options) .await?; loop { let mess: SeaMessage = consumer.next().await?; println!("[{}] {}", mess.timestamp(), mess.message().as_str()?); } } ``` -------------------------------- ### Complex Stream Processing Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-stdio/src/bin/README.md This example shows a more complex stream processing pipeline using 'clock' and 'relay' utilities. It demonstrates how to chain multiple SeaStreamer utilities together. ```shell cargo run --bin clock -- --interval 1s --stream clock | cargo run --bin complex -- --input clock --output relay ``` -------------------------------- ### Run Redpanda Kafka Broker Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-kafka/NOTES.md Starts a Redpanda Kafka broker in detached mode. This is a prerequisite for using SeaStreamer with Kafka. ```bash docker run -d --rm -p 9092:9092 -p 9644:9644 redpandadata/redpanda:latest redpanda start --overprovisioned --smp 1 --memory 1G --reserve-memory 0M --node-id 0 --check=false ``` -------------------------------- ### Decoder Output Example Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-file/sea-streamer-file-reader/README.md This log output demonstrates the typical format of data processed by the SeaStreamer file decoder. It includes timestamps, stream information, and the decoded content. ```log # {"fileName":"consumer-1691686154741","createdAt":"2023-08-10T16:49:14.742Z","beaconInterval":1024} [2023-08-10T16:49:14.745Z | hello | 0 | 1] hello-0 [2023-08-10T16:49:14.746Z | hello | 1 | 1] hello-1 [2023-08-10T16:49:14.748Z | hello | 2 | 1] hello-2 [2023-08-10T16:49:14.750Z | hello | 3 | 1] hello-3 [2023-08-10T16:49:14.751Z | hello | 4 | 1] hello-4 [2023-08-10T16:49:14.753Z | hello | 5 | 1] hello-5 [2023-08-10T16:49:14.754Z | hello | 6 | 1] hello-6 [2023-08-10T16:49:14.755Z | hello | 7 | 1] hello-7 [2023-08-10T16:49:14.757Z | hello | 8 | 1] hello-8 [2023-08-10T16:49:14.758Z | hello | 9 | 1] hello-9 [2023-08-10T16:49:14.759Z | hello | 10 | 1] hello-10 [2023-08-10T16:49:14.761Z | hello | 11 | 1] hello-11 [2023-08-10T16:49:14.762Z | hello | 12 | 1] hello-12 [2023-08-10T16:49:14.763Z | hello | 13 | 1] hello-13 [2023-08-10T16:49:14.765Z | hello | 14 | 1] hello-14 [2023-08-10T16:49:14.766Z | hello | 15 | 1] hello-15 [2023-08-10T16:49:14.768Z | hello | 16 | 1] hello-16 [2023-08-10T16:49:14.769Z | hello | 17 | 1] hello-17 [2023-08-10T16:49:14.770Z | hello | 18 | 1] hello-18 [2023-08-10T16:49:14.771Z | hello | 19 | 1] hello-19 [2023-08-10T16:49:14.773Z | hello | 20 | 1] hello-20 # [{"header":{"streamKey":"hello","shardId":1,"sequence":20,"timestamp":"2023-08-10T16:49:14.773Z"},"runningChecksum":2887}] [2023-08-10T16:49:14.775Z | hello | 21 | 1] hello-21 [2023-08-10T16:49:14.777Z | hello | 22 | 1] hello-22 [2023-08-10T16:49:14.778Z | hello | 23 | 1] hello-23 [2023-08-10T16:49:14.780Z | hello | 24 | 1] hello-24 [2023-08-10T16:49:14.781Z | hello | 25 | 1] hello-25 ... ``` -------------------------------- ### NDJSON Format Example Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-file/README.md An example of the NDJSON (Newline Delimited JSON) format used by `ss-decode`. Each JSON object represents a message with header and payload details. ```json /* header */ {"header":{"stream_key":"hello","shard_id":0,"sequence":1,"timestamp":"2023-06-05T13:55:53.001"},"payload":"message-1"} /* beacon */ ``` -------------------------------- ### Invalid Message Formats Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-stdio/README.md Shows examples of invalid message formats that will not be processed correctly by the stdio backend. ```log [Jan 1, 2022] { "payload": "anything" } ``` ```log [2022-01-01T00:00:00] 12345 ``` -------------------------------- ### Replay Stream from Kafka Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Replays messages from a Kafka topic to Stdio, starting from the beginning of the stream. Useful for reprocessing historical data. ```shell relay -- --input kafka://localhost:9092/clock --output stdio:///clock --offset start ``` -------------------------------- ### Replay Stream from Redis Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Replays messages from a Redis stream to Stdio, starting from the beginning of the stream. Useful for reprocessing historical data. ```shell relay -- --input redis://localhost:6379/clock --output stdio:///clock --offset start ``` -------------------------------- ### Basic Stream Producer Example Source: https://github.com/seaql/sea-streamer/blob/main/README.md This Rust code shows a basic stream producer. It connects to a stream and sends 100 messages, each formatted as a JSON string with a 'tick' count, with a one-second delay between sends. The producer ensures all messages are flushed before ending. ```rust #[tokio::main] async fn main() -> Result<()> { env_logger::init(); let Args { stream } = Args::parse(); let streamer = SeaStreamer::connect(stream.streamer(), Default::default()).await?; let producer: SeaProducer = streamer .create_producer(stream.stream_key()?, Default::default()) .await?; for tick in 0..100 { let message = format!(r#""tick {{tick}}""#); eprintln!(message); producer.send(message)?; tokio::time::sleep(Duration::from_secs(1)).await; } producer.end().await?; // flush Ok(()) } ``` -------------------------------- ### Relay Stream with Relay Utility Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-stdio/src/bin/README.md The 'relay' utility streams data from an input and redirects it to an output. It's most useful when combined with filters. This example demonstrates piping the 'clock' stream to 'relay'. ```shell cargo run --bin clock -- --interval 1s --stream clock | cargo run --bin relay -- --input clock --output relay ``` -------------------------------- ### Basic Stream Processor Example Source: https://github.com/seaql/sea-streamer/blob/main/README.md This Rust code implements a basic stream processor. It consumes messages from an input stream, processes them using a `process` function, and produces the results to an output stream. It supports both real-time and file-based stream configurations. ```rust #[tokio::main] async fn main() -> Result<()> { env_logger::init(); let Args { input, output } = Args::parse(); let streamer = SeaStreamer::connect(input.streamer(), Default::default()).await?; let options = SeaConsumerOptions::new(ConsumerMode::RealTime); let consumer: SeaConsumer = streamer .create_consumer(input.stream_keys(), options) .await?; let streamer = SeaStreamer::connect(output.streamer(), Default::default()).await?; let producer: SeaProducer = streamer .create_producer(output.stream_key()?, Default::default()) .await?; loop { let message: SeaMessage = consumer.next().await?; let message = process(message).await?; eprintln!(message); producer.send(message)?; // send is non-blocking } } ``` -------------------------------- ### Run Basic Processor with Kafka Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md Demonstrates how to run the producer, processor, and consumer using Kafka as the stream backend. Ensure Kafka is running locally. ```bash # Produce some input cargo run --bin producer -- --stream kafka://localhost:9092/hello1 & # Start the processor, producing some output cargo run --bin processor -- --input kafka://localhost:9092/hello1 --output kafka://localhost:9092/hello2 & # Replay the output cargo run --bin consumer -- --stream kafka://localhost:9092/hello2 # Remember to stop the processes kill %1 %2 ``` -------------------------------- ### Run Basic Processor with File Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md Demonstrates how to run the producer and consumer using local files as the stream backend. The processor outputs to stdio. ```bash # Create the file file=/tmp/sea-streamer-$(date +%s) touch $file && echo "File created at $file" # Produce some input cargo run --bin producer -- --stream file://$file/hello & # Replay the input cargo run --bin consumer -- --stream file://$file/hello # Start the processor, producing some output cargo run --bin processor -- --input file://$file/hello --output stdio:///hello ``` -------------------------------- ### Run Basic Processor with Redis Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md Demonstrates how to run the producer, processor, and consumer using Redis as the stream backend. Ensure Redis is running locally. ```bash # Produce some input cargo run --bin producer -- --stream redis://localhost:6379/hello1 & # Start the processor, producing some output cargo run --bin processor -- --input redis://localhost:6379/hello1 --output redis://localhost:6379/hello2 & # Replay the output cargo run --bin consumer -- --stream redis://localhost:6379/hello2 # Remember to stop the processes kill %1 %2 ``` -------------------------------- ### Run Basic Processor with Stdio Source: https://github.com/seaql/sea-streamer/blob/main/examples/README.md Demonstrates how to pipe the output of the producer directly into the input of the processor using standard input/output. ```bash # Pipe the producer to the processor cargo run --bin producer -- --stream stdio:///hello1 | \ cargo run --bin processor -- --input stdio:///hello1 --output stdio:///hello2 ``` -------------------------------- ### Connecting Processors with Unix Pipes Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-stdio/README.md Demonstrates how to connect multiple stream processors using Unix pipes for sequential processing. ```shell touch stream # set up an empty file tail -f stream | processor_b # program b can be spawned anytime processor_a >> stream # append to the file ``` -------------------------------- ### redis-streams-dump Usage Help Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-redis/redis-streams-dump/README.md Displays the command-line usage and options for the redis-streams-dump utility. ```sh redis-streams-dump USAGE: redis-streams-dump [OPTIONS] --output --stream FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: --output Output file. Overwrites if exist --since Timestamp start of range --stream Streamer URI with stream key, i.e. try `redis://localhost/hello` --until Timestamp end of range ``` -------------------------------- ### Run Producer, Relay, and Consumer Pipeline Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes a pipeline of producer, relay, and consumer benchmarks using stdio streams. Requires release builds for all components. ```sh time ( cargo run --release --bin producer -- --stream stdio:///clock | cargo run --release --bin relay -- --input clock --output relay | cargo run --release --bin consumer -- --stream stdio:///relay ) ``` -------------------------------- ### Run Consumer Benchmark with File Stream Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes the consumer benchmark using Cargo with a file stream. Requires a release build. ```sh time cargo run --release --bin consumer -- --stream file://clock.ss/clock ``` -------------------------------- ### Run Baseline Benchmark Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes the baseline benchmark using Cargo. Compares performance against itself over time. Requires a release build. ```sh time cargo run --release --bin baseline -- --stream stdio:///test ``` -------------------------------- ### Run Producer Benchmark with Stdout Stream Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes the producer benchmark using Cargo with stdio stream, redirecting output to a file. Requires a release build. ```sh time cargo run --release --bin producer -- --stream stdio:///clock > clock.log ``` -------------------------------- ### Running the Decoder Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-file/sea-streamer-file-reader/README.md Execute the decoder script using npm, specifying the input file path. This command initiates the process of reading and decoding a SeaStreamer file. ```sh npm run decoder -- --file ./testcases/consumer.ss ``` -------------------------------- ### Run ss-decode with File and Format Source: https://github.com/seaql/sea-streamer/blob/main/README.md Basic usage of the `ss-decode` command. Specify the input file and desired output format. ```sh ss-decode --file --format ``` -------------------------------- ### Run Producer Benchmark with File Stream Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes the producer benchmark using Cargo with a file stream. Creates or overwrites a file for the stream. Requires a release build. ```sh rm clock.ss; touch clock.ss; time cargo run --release --bin producer -- --stream file://clock.ss/clock ``` -------------------------------- ### Run Consumer Benchmark with Redis Stream Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes the consumer benchmark using Cargo with a Redis stream. Requires a release build and a running Redis instance. ```sh time cargo run --release --bin consumer -- --stream redis://localhost/clock ``` -------------------------------- ### Run Producer Benchmark with Redis Stream Source: https://github.com/seaql/sea-streamer/blob/main/benchmark/README.md Executes the producer benchmark using Cargo with a Redis stream. Requires a release build and a running Redis instance. ```sh time cargo run --release --bin producer -- --stream redis://localhost/clock ``` -------------------------------- ### Run SeaStreamer Iggy Tests Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-iggy/README.md Executes tests for the sea-streamer-iggy package. Requires the 'test' and 'runtime-tokio' features to be enabled. ```bash cargo test --package sea-streamer-iggy --features test,runtime-tokio -- --nocapture ``` -------------------------------- ### Decode SeaStreamer File with Pagination Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-file/README.md Demonstrates how to use the `ss-decode` utility to view the contents of a SeaStreamer file (`.ss`) and pipe the output to `less` for pagination. ```sh ss-decode --file mystream.ss | less ``` -------------------------------- ### Valid Message Formats with Metadata Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-stdio/README.md Illustrates various valid formats for messages sent to stdin, including raw payloads and payloads with metadata like timestamp, stream key, sequence, and shard ID. ```log a plain, raw message ``` ```log [2022-01-01T00:00:00] { "payload": "anything" } ``` ```log [2022-01-01T00:00:00.123 | my_topic] "a string payload" ``` ```log [2022-01-01T00:00:00 | my-topic-2 | 123] ["array", "of", "values"] ``` ```log [2022-01-01T00:00:00 | my-topic-2 | 123 | 4] { "payload": "anything" } ``` ```log [my_topic] a string payload ``` ```log [my_topic | 123] { "payload": "anything" } ``` ```log [my_topic | 123 | 4] { "payload": "anything" } ``` -------------------------------- ### Stream from Stdio to Kafka Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Streams messages generated by the 'clock' program from Stdio to Kafka using the 'relay' program. Ensure Kafka is running and accessible. ```shell # Stdio -> Kafka clock -- --stream clock --interval 1s | \ relay -- --input stdio:///clock --output kafka://localhost:9092/clock ``` -------------------------------- ### Stream from Stdio to Redis Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Streams messages generated by the 'clock' program from Stdio to Redis using the 'relay' program. Ensure Redis is running and accessible. ```shell # Stdio -> Redis clock -- --stream clock --interval 1s | \ relay -- --input stdio:///clock --output redis://localhost:6379/clock ``` -------------------------------- ### Sample Kraken Websocket Message Source: https://github.com/seaql/sea-streamer/blob/main/examples/price-feed/README.md A sample JSON message received from the Kraken websocket feed for the GBP/USD spread. ```json {"spread":{"bid":"1.23150","ask":"1.23166","timestamp":"2024-04-22T11:24:41.461661","bid_vol":"40.55300552","ask_vol":"315.04699448"},"channel_name":"spread","pair":"GBP/USD"} ``` -------------------------------- ### Generate Tick Stream with Clock Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-stdio/src/bin/README.md Use the 'clock' utility to generate a stream of ticks at a specified interval. This is useful for creating timed events or data sources. ```shell cargo run --bin clock -- --interval 1s --stream clock ``` -------------------------------- ### Add SeaStreamer to Cargo.toml Source: https://github.com/seaql/sea-streamer/blob/main/README.md Add the SeaStreamer dependency to your Cargo.toml file. Specify features like kafka, redis, socket, and runtime-tokio as needed. ```toml sea-streamer = { version = "0", features = ["kafka", "redis", "socket", "runtime-tokio"] } ``` -------------------------------- ### Stream from Kafka to Redis Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Relays messages from a Kafka topic to a Redis stream. Requires both Kafka and Redis to be running and accessible. ```shell # Kafka -> Redis relay -- --input kafka://localhost:9092/clock --output redis://localhost:6379/clock ``` -------------------------------- ### Local ss-decode Alias Source: https://github.com/seaql/sea-streamer/blob/main/README.md Creates a local alias for `ss-decode` to use the cargo run command. This is useful for testing or using a specific local version. ```sh alias ss-decode='cargo run --package sea-streamer-file --features=executables --bin ss-decode' ``` -------------------------------- ### Stream from Redis to Kafka Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-socket/README.md Relays messages from a Redis stream to a Kafka topic. Requires both Redis and Kafka to be running and accessible. ```shell # Redis -> Kafka relay -- --input redis://localhost:6379/clock --output kafka://localhost:9092/clock ``` -------------------------------- ### Dump Redis Streams to SeaStreamer File Source: https://github.com/seaql/sea-streamer/blob/main/sea-streamer-redis/redis-streams-dump/README.md Use the utility to dump messages from a Redis stream to a SeaStreamer file, specifying a time range. Alternatively, run it within a workspace. ```sh redis-streams-dump --stream redis://localhost/clock --output ./clock.ss --since 2023-09-05T13:30:00.7 --until 2023-09-05T13:30:00.8 # OR in the workspace cargo run --package redis-streams-dump -- .. ``` -------------------------------- ### StreamUrl Parsing Behavior Change Source: https://github.com/seaql/sea-streamer/blob/main/CHANGELOG.md Demonstrates the updated parsing behavior for `StreamUrl` which now requires an ending slash. `StreamerUri` parsing remains unchanged. ```rust assert!("redis://localhost/a,b".parse::().is_ok()); assert!("redis://localhost/".parse::().is_ok()); assert!("redis://localhost".parse::().is_err()); // previously this was OK assert!("redis://localhost".parse::().is_ok()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.