This is an automated email from the ASF dual-hosted git repository.

kparisa pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iggy-website.git


The following commit(s) were added to refs/heads/main by this push:
     new dd8dd3412 docs: say what happens when the getting started apps are run 
again (#107)
dd8dd3412 is described below

commit dd8dd341217ab1bf563ea1fefcc9898a919f7f6f
Author: Justin Mclean <[email protected]>
AuthorDate: Wed Sep 16 14:22:44 2026 +1000

    docs: say what happens when the getting started apps are run again (#107)
    
    The producer appends to the existing stream instead of failing, and the
    consumer starts at offset 0 so it replays earlier messages. Neither is
    obvious from the code, and the guide never says how to start over.
    
    Co-authored-by: Justin Mclean <[email protected]>
    Co-authored-by: Kranti Parisa <[email protected]>
---
 content/docs/introduction/getting-started.mdx | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/content/docs/introduction/getting-started.mdx 
b/content/docs/introduction/getting-started.mdx
index 3532f739f..645502cbf 100644
--- a/content/docs/introduction/getting-started.mdx
+++ b/content/docs/introduction/getting-started.mdx
@@ -566,6 +566,17 @@ fn handle_message(message: &IggyMessage) -> Result<(), 
Box<dyn Error>> {
 Start the Iggy server, and then producer and consumer applications 
respectively - you should observe your messages being streamed flawlessly :)
 
 
+## Running it again, and cleaning up
+
+Both applications are safe to run a second time, but the result may surprise 
you.
+
+The producer finds the stream and topic already there, says so, and appends 
another set of messages rather than failing. The consumer starts from offset 0 
every time, so a second run replays the messages from the first one as well as 
the new ones.
+
+To start over with an empty server, stop it and clear its data:
+
+- **Docker**: the `--rm` in the command above removes the container when you 
stop it with Ctrl-C, so the next `docker run` starts empty.
+- **From source**: stop the server with Ctrl-C, then start it again with 
`--fresh`, which wipes the data directory first. To remove that data without 
starting the server, delete the `local_data` directory in the working directory 
you ran it from.
+
 ## Summary
 
 What we've just achieved is merely the tip of an iceberg, however, it should 
give you a good understanding of what Iggy is all about, and hopefully, it 
wasn't too difficult to follow and get things up and running for the first 
time. Feel free to take a look at the more advanced 
[examples](https://github.com/apache/iggy/tree/master/examples/rust), how to 
make use of `IggyClient` wrapper on top of the existing implementations of the 
`Client` trait, what happens when you start multiple prod [...]

Reply via email to