Code Monkey home page Code Monkey logo

notification-service's Introduction

notification-service

Notification service(Routing incoming Kafka messages to web socket)

There might be a need of propagating the messages received by an application on a Kafka topic to the clients using Websocket. Since, websockets receive messages without the need of refreshing the page. This use case fits well if we want to enable real time notifications in our application.

How to test the functionality

  1. Clone the repo https://github.com/amitdhodi/notification-service.git and download the code locally
  2. Import the project as Maven project in your IDE
  3. Download(if not done) and start local Kafka cluster. Reference link to do the same(http://kafka.apache.org/quickstart). Only perform Step 1(Download the code) & 2(Start the server) using the above link.
  4. Start the application by running NotificationApplication.java
  5. Application will start on port 8080. Once it is up, browse URL http://localhost:8080
  6. This would render an empty text area.
  7. Send message to kafka topic "inbound". Either Kafka Tool can be used (http://www.kafkatool.com/download.html) or command line producer can be used to send the message. The message json format is:
{
 "firstName":"foo",
 "lastName":"bar"
}
  1. Once the message is posted successfully, the URL http://localhost:8080 must reflect the json message inside the text area without the need of refreshing the page.
  2. This shows the real time notifications on browser originated by a kafka message.

notification-service's People

Contributors

amitdhodi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.