Skip to content

Event Driven Architecture using Spring Cloud with Kafka-stream as binder.

Notifications You must be signed in to change notification settings

someshbhardwaj/spring-cloud-kafka-saga-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-cloud-kafka-saga-pattern

Pre-requisites: Install Kafka Install Spring Install Java

Start Zookeper

zookeeper-server-start.bat d:\Software\kafka_2.13-2.5.0\config\zookeeper.properties

Start Kafka server

kafka-server-start.bat d:\Software\kafka_2.13-2.5.0\config\server.properties

Create Order Request Image Image of Create An Order

Get All Order Request Image Image of Search

Project Code Flow Image Image of Project Code Flow

Snippets from Application.yml 
spring.cloud.stream:
  function:
     definition: orderEventPublisher;shippingEventPublisher;orderEventProcessor;shippingEventProcessor;paymentEventConsumer;shippingEventConsumer
  bindings:
    orderEventPublisher-out-0:
      destination: order-events
    orderEventProcessor-in-0:
      destination: order-events
    orderEventProcessor-out-0:
      destination: payment-events
    paymentEventConsumer-in-0:
      destination: payment-events
    shippingEventPublisher-out-0:
      destination: shppingafterpayment-events  
    shippingEventProcessor-in-0:
      destination: shppingafterpayment-events
    shippingEventProcessor-out-0:
      destination: shipping-events
    shippingEventConsumer-in-0:
      destination: shipping-events

You can further take the code and make the changes to add the DB to it. You can also make the kafka cluster and use it and also add the concurrency to the same code.

About

Event Driven Architecture using Spring Cloud with Kafka-stream as binder.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages