Shaolans / generator-jhipster-kafka

A JHipster Module to generate Apache Kafka consumers and producers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

generator-jhipster-kafka

NPM version Build Status Dependency Status

JHipster module, A JHipster module to generate Apache Kafka consumers and producers.

Introduction

This is a JHipster module, that is meant to be used in a JHipster application.

Prerequisites

As this is a JHipster module, we expect you have JHipster and its related tools already installed:

Installation

With NPM

To install this module:

npm install -g generator-jhipster-kafka

To update this module:

npm update -g generator-jhipster-kafka

With Yarn

To install this module:

yarn global add generator-jhipster-kafka

To update this module:

yarn global upgrade generator-jhipster-kafka

Usage

This describes how to use basically this module with a JHipster generated project:

  1. Create a JHipster project in a new folder: mkdir myproject && jhipster
  2. Choose Asynchronous messages using Apache Kafka in server side options when answering the following question : "Which other technologies would you like to use?"
  3. Go to the generator-jhipster-kafka project folder and run npm link
  4. Go back to your JHipster project and run npm link generator-jhipster-kafka
  5. In the same folder, then run yo jhipster-kafka
  6. You can choose to add a consumer and/or a producer for an given entity name (identified by its domain class name in the package domain of your JHipster application, where entities are generated by jhipster entity or JDL Studio based file through jhipster import-jdl file_name.jh)

You can then use your entity producer (for instance: OrderProducer.java) in other layers like controllers or even better service by instancing it and using its send method.

Generated consumers should not be explicitly used in other classes as each of them is running in a thread listening to the incoming messages.

License

Apache-2.0 © François Delbrayelle

About

A JHipster Module to generate Apache Kafka consumers and producers

License:Apache License 2.0


Languages

Language:JavaScript 43.0%Language:HTML 39.4%Language:Shell 17.6%