Skip to content

silviobuss/demo-bulkhead

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo-bulkhead

Getting Started

Just run the Application.java in your IDE.
Application is running on http://localhost:9090.

Example

I will be using the idea of a bank where the operations to get cash or deposit money can only happen one at a time.

Requirements for this example:

  • If I have a balance, I subtract the amount request from the current balance
  • Each operation can take up to 3 seconds to process
  • The bank can process only one transaction at a time.

To do the BankService Bulkhead tests, run the two endpoints below in less than 3 seconds.

When trying to process two transactions at the same time, one to get cash and another to make a deposit, we get an exception in the attempt to process the second request because the application received the second request before we finish the first one avoid us to make a mistake in the way to calculate the current balance of the user.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages