Skip to content

66-24/pictogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

A Spring boot Application with Leader Election using spring-integration.

Features

  • Leader Election using Zookeeper and Spring-integration
  • Loads resource(s) that are decorated with build time properties such as project.version.
    See docs
  • Use @Primary, when there are more than 1 candidate beans found for autowiring
  • DropWizard ScheduledReporters have start and stop methods, but are not designed to be started and stopped more thanonce. Hence using a Prototype Scope with these Reporters to get a different instance on Leader election.
  • System Metrics and Health using spring-actuator
  • Uses an external XML configuration file in addition to application.properties
    • Uses apache commons configuration to parse the XML configuration
    • Issue: PlaceHolders in Lists are not expanded

Notes

  1. Structured app as shown here
  2. Spring-Integration documentation on leader election
  3. Spring-cloud: _<> has been sunset in favor of Spring-Integration.
  4. Interesting issue
  5. Source on github
  6. Roles

Testing

ZooKeeper

If you don't have Zookeeper installed, the easiest way to run Zookeeper is to start TestingServer. See com.tutorial.spring.pictogram.PictogramApplicationTests

Leader Election

Use SSH local port forwarding:

ssh -NL 9191:localhost:2181 localhost

Starting Multiple Instances of Pictogram

Change the following Program Arguments for each instance:

--zookeeper.port=9191
--management.port=9091
--server.port=9090

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published