Skip to content

zachelrath/pulsar-graceful-shutdown-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graceful shutdown with Apache Pulsar Java client in Spring Boot

Sample application created to demonstrate how to properly implement graceful shutdown of Apache Pulsar queue consumers in Java with Spring Boot, to accompany this blog post:

https://medium.com/@zachcorbettmcelrath/graceful-shutdown-of-pulsar-queue-consumers-in-java-and-spring-boot-f93645a92b2b

Run Pulsar (in standalone cluster, via Docker Compose)

docker compose up -d

Build the app

./mvnw clean install

Run producer and consumer (via command-line)

Producer

SPRING_PROFILES_ACTIVE=producer ./mvnw spring-boot:run

Consumer

SPRING_PROFILES_ACTIVE=consumer ./mvnw spring-boot:run

About

Graceful shutdown of Apache Pulsar Java consumers in Spring

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages