Wednesday, 15 August 2018

Webhook - Rest EndPoint to Spring Kafka Topic

Use case is to expose a Rest API for execution of  any logic and trigger backend  systems for n number of transaction , invocation or transactions.

Technology Stack : JEE, Spring Boot , Spring - Kafka Template.


1) Start the Kafka and Zoo Keeper Server. (This is required specially for component connection from spring kafka)

2) Run the Spring Boot Micro Service it will connect to the kafka topics, etc on startup.

3) Rest Endpoint will be exposed as a API resource which takes  a Json Object which can be categorized and developed based on the requirement.

4) Once the rest endpoint message is sent , the exposed api uses the already connected Topic and  directly drops the message in the kafka topic.

5) @KafkaListener can be used to read these messages dropped to the topic. These can now be used to invoke or trigger any actions required based on the business use case.


Source link on git  : - https://github.com/sanalsamuel/WebhookToKafka

No comments:

Post a Comment

AWS Certificate Manager - Import Certificate

How to import a certificate. Use Key Store Explorer to open the cert and export keypair in PEM format  This will save a file cert.pem. Make ...