The topic naming convention has been set to: message_type.application_name.entity_name
(all in snake_case, it can be changed of course):
- message_type: queuing, logging, tracking, etl/db, streaming, push, user...
- application_name: the application base name
- entity_name: the entity name (or the prefix if no entity) which is consumed
This module allows the user to write new Kafka configuration (new Java files and application.yml
updates). In order to achieve it, prompt options are asked step-by-step until you decide to finish your configuration.
You can choose to merge the new configuration with the previous configuration or just replace it, by typing y
or n
to the question "Do you want to clean up your current Kafka configuration?".
After following the first 3 steps of the basic usage above, choose a mode and follow the steps:
- Create a new entity if not already generated with:
jhipster entity Foo
- In the same folder, run
yo jhipster-kafka
- "Do you want to clean up your current Kafka configuration?" - Your answer or 'n' by default
- "What is your bootstrap servers string connection (you can add several bootstrap servers by using a "," delimiter)?" - Your answer or 'localhost:9092' by default
- "For which entity (class name)?" - Foo (the available entities are retrieved in the
.jhipster
folder as.json
) - "Which components would you like to generate?" - Consumer
- "Which topic for Foo?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for Foo?")
- "What is the consumer polling timeout (in ms)?" - Your answer or '10000' by default (global for all consumers)
- "Define the auto offset reset policy?" - Your answer or 'earliest' by default (global for all consumers)
- "Do you want to continue adding consumers or producers?" - Your answer or 'N' par default
- Overwrite all files in conflict
FooConsumer
(consumesFoo
) is available with aFooDeserializer
After following the first 3 steps of the basic usage above, choose a mode and follow the steps:
- Create a new entity if not already generated with:
jhipster entity Foo
- In the same folder, run
yo jhipster-kafka
- "Do you want to clean up your current Kafka configuration?" - Your answer or 'n' by default
- "What is your bootstrap servers string connection (you can add several bootstrap servers by using a "," delimiter)?" - Your answer or 'localhost:9092' by default
- "For which entity (class name)?" - Foo (the available entities are retrieved in the
.jhipster
folder as.json
) - "Which components would you like to generate?" - Producer
- "Which topic for Foo?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for Foo?")
- "Do you want to send ordered messages for (entity/prefix) production?" - Your answer or 'y' by default
- "Do you want to continue adding consumers or producers?" - Your answer or 'N' par default
- Overwrite all files in conflict
FooProducer
(producesFoo
) is available with aFooSerializer
and aFooKafkaResource
to help testing
After following the first 3 steps of the basic usage above, choose a mode and follow the steps:
- Create a new entity if not already generated with:
jhipster entity Foo
- In the same folder, run
yo jhipster-kafka
- "Do you want to clean up your current Kafka configuration?" - Your answer or 'n' by default
- "What is your bootstrap servers string connection (you can add several bootstrap servers by using a "," delimiter)?" - Your answer or 'localhost:9092' by default
- "For which entity (class name)?" - No entity (will be typed String)
- "How would you prefix your objects (no entity, for instance: [SomeEventType]Consumer|Producer...)?" - someEventType
- "Which components would you like to generate?" - Consumer
- "Which topic for someEventType?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for someEventType?")
- "What is the consumer polling timeout (in ms)?" - Your answer or '10000' by default (global for all consumers)
- "Define the auto offset reset policy?" - Your answer or 'earliest' by default (global for all consumers)
- "Do you want to continue adding consumers or producers?" - Your answer or 'N' par default
- Overwrite all files in conflict
SomeEventTypeConsumer
(consumesString
) is available with aSomeEventTypeDeserializer
After following the first 3 steps of the basic usage above, choose a mode and follow the steps:
- Create a new entity if not already generated with:
jhipster entity Foo
- In the same folder, run
yo jhipster-kafka
- "Do you want to clean up your current Kafka configuration?" - Your answer or 'n' by default
- "What is your bootstrap servers string connection (you can add several bootstrap servers by using a "," delimiter)?" - Your answer or 'localhost:9092' by default
- "For which entity (class name)?" - No entity (will be typed String)
- "How would you prefix your objects (no entity, for instance: [SomeEventType]Consumer|Producer...)?" - someEventType
- "Which components would you like to generate?" - Producer
- "Which topic for someEventType?" - Any choice (choosing "Custom topic name" will add another question "What is the topic name for someEventType?")
- "Do you want to send ordered messages for (entity/prefix) production?" - Your answer or 'y' by default
- "Do you want to continue adding consumers or producers?" - Your answer or 'N' par default
- Overwrite all files in conflict
SomeEventTypeProducer
(producesString
) is available with aSomeEventTypeSerializer
and aSomeEventTypeKafkaResource
to help testing