From 020e62891ea2ee0dd3621c932cfbb4c516f95689 Mon Sep 17 00:00:00 2001 From: monxx Date: Mon, 15 Jun 2020 19:22:29 +0200 Subject: [PATCH] change documentation --- README.md | 113 ++++++++++++++++----------------------------------- USE_CASES.md | 78 ++++------------------------------- 2 files changed, 43 insertions(+), 148 deletions(-) diff --git a/README.md b/README.md index 6877da5..6525373 100644 --- a/README.md +++ b/README.md @@ -108,100 +108,59 @@ The different [use cases](USE_CASES.md) are listed on another page. ## Prompt options tree -Choose your own adventure module! +Do your own configuration step-by-step! The **END** represents the end of the prompts below, when files are written after confirmation (you can use the `--force` option with `yo jhipster-kafka` to overwrite all files). + ## Skip prompts diff --git a/USE_CASES.md b/USE_CASES.md index 0cc704f..b9b7736 100644 --- a/USE_CASES.md +++ b/USE_CASES.md @@ -8,37 +8,19 @@ The **topic naming convention** has been set to: `message_type.application_name. - application_name: the application base name - entity_name: the entity name (or the prefix if no entity) which is consumed -### Big Bang Mode +### Define your configuration Step-by-step -The Big Bang Mode allows the user to rewrite from scratch all the Kafka configuration (Java files and `application.yml`) to generate new components. +This modules allows the user to write new Kafka configuration (new Java files and `application.yml` updates). And in order to achieve it, prompt options are asked step-by-step until you decide to finish your configuration. -### Incremental Mode - -The Incremental Mode allows the user to write new Kafka configuration (new Java files and `application.yml` updates) to generate new components over previous configuration. In this mode prompt options are asked and there is a loop for these questions. +You can choose to merge the new configuration with the previous configuration or just replace it, by selecting `"y"` or `"n"` to the question `"Do you want to clean up your current Kafka configuration?"` ### Create a consumer linked to an entity After following the first 3 steps of the [basic usage](README.md#basic-usage) above, choose a mode and follow the steps: -#### Big Bang Mode - -1. Create a new entity if not already generated with: `jhipster entity Foo` -2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Big Bang Mode (build a configuration from scratch) -4. "Which components would you like to generate?" - Consumer -5. "For which entity (class name)?" - Foo (the available entities are retrieved in the `.jhipster` folder as `.json`) -6. "What is the consumer polling timeout (in ms)?" - Your answer or '10000' by default (global for all consumers) -7. "Define the auto offset reset policy?" - Your answer or 'earliest' by default (global for all consumers) -8. "Which topic for Foo?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for Foo?") -9. Loop on each entity with step 8 -10. Overwrite all files in conflict -11. `FooConsumer` (consumes `Foo`) is available with a `FooDeserializer` - -#### Incremental Mode - 1. Create a new entity if not already generated with: `jhipster entity Foo` 2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Incremental Mode (upgrade an existing configuration) +3. "Do you want to clean up your current Kafka configuration?" - `'y' or 'n'` 4. "For which entity (class name)?" - Foo (the available entities are retrieved in the `.jhipster` folder as `.json`) 5. "Which components would you like to generate?" - Consumer 6. "For which topic?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name?") @@ -52,23 +34,9 @@ After following the first 3 steps of the [basic usage](README.md#basic-usage) ab After following the first 3 steps of the [basic usage](README.md#basic-usage) above, choose a mode and follow the steps: -#### Big Bang Mode - -1. Create a new entity if not already generated with: `jhipster entity Foo` -2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Big Bang Mode (build a configuration from scratch) -4. "Which components would you like to generate?" - Producer -5. "For which entity (class name)?" - Foo (the available entities are retrieved in the `.jhipster` folder as `.json`) -6. "Which topic for Foo?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for Foo?") -7. Loop on each entity with step 6 -8. Overwrite all files in conflict -9. `FooProducer` (produces `Foo`) is available with a `FooSerializer` and a `FooKafkaResource` to [help testing](README.md#test-consumers-and-producers) - -#### Incremental Mode - 1. Create a new entity if not already generated with: `jhipster entity Foo` 2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Incremental Mode (upgrade an existing configuration) +3. "Do you want to clean up your current Kafka configuration?" - `'y' or 'n'` 4. "For which entity (class name)?" - Foo (the available entities are retrieved in the `.jhipster` folder as `.json`) 5. "Which components would you like to generate?" - Producer 6. "For which topic?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name?") @@ -80,26 +48,9 @@ After following the first 3 steps of the [basic usage](README.md#basic-usage) ab After following the first 3 steps of the [basic usage](README.md#basic-usage) above, choose a mode and follow the steps: -#### Big Bang Mode - 1. Create a new entity if not already generated with: `jhipster entity Foo` 2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Big Bang Mode (build a configuration from scratch) -4. "Which components would you like to generate?" - Consumer -5. "For which entity (class name)?" - No entity (will be typed String) -6. "How would you prefix your objects (no entity, for instance: [SomeEventType]Consumer|Producer...)?" - someEventType -7. "What is the consumer polling timeout (in ms)?" - Your answer or '10000' by default (global for all consumers) -8. "Define the auto offset reset policy?" - Your answer or 'earliest' by default (global for all consumers) -9. "Which topic for Foo?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for Foo?") -10. Loop on each entity with step 9 -11. Overwrite all files in conflict -12. `SomeEventTypeConsumer` (consumes `String`) is available with a `SomeEventTypeDeserializer` - -#### Incremental Mode - -1. Create a new entity if not already generated with: `jhipster entity Foo` -2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Incremental Mode (upgrade an existing configuration) +3. "Do you want to clean up your current Kafka configuration?" - `'y' or 'n'` 4. "For which entity (class name)?" - No entity (will be typed String) 5. "How would you prefix your objects (no entity, for instance: [SomeEventType]Consumer|Producer...)?" - someEventType 6. "Which components would you like to generate?" - Consumer @@ -114,24 +65,9 @@ After following the first 3 steps of the [basic usage](README.md#basic-usage) ab After following the first 3 steps of the [basic usage](README.md#basic-usage) above, choose a mode and follow the steps: -#### Big Bang Mode - -1. Create a new entity if not already generated with: `jhipster entity Foo` -2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Big Bang Mode (build a configuration from scratch) -4. "Which components would you like to generate?" - Producer -5. "For which entity (class name)?" - No entity (will be typed String) -6. "How would you prefix your objects (no entity, for instance: [SomeEventType]Consumer|Producer...)?" - someEventType -7. "Which topic for Foo?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for Foo?") -8. Loop on each entity with step 7 -9. Overwrite all files in conflict -10. `SomeEventTypeProducer` (produces `String`) is available with a `SomeEventTypeSerializer` and a `SomeEventTypeKafkaResource` to [help testing](README.md#test-consumers-and-producers) - -#### Incremental Mode - 1. Create a new entity if not already generated with: `jhipster entity Foo` 2. In the same folder, run `yo jhipster-kafka` -3. "Which type of generation do you want?" - Incremental Mode (upgrade an existing configuration) +3. "Do you want to clean up your current Kafka configuration?" - `'y' or 'n'` 4. "For which entity (class name)?" - No entity (will be typed String) 5. "How would you prefix your objects (no entity, for instance: [SomeEventType]Consumer|Producer...)?" - someEventType 6. "Which components would you like to generate?" - Producer