UserRegistrationController
@RestController | |
public class UserRegistrationController { | |
@PostMapping("/register/seller") | |
public String registerAsSeller(@RequestBody SellerDto sellerDto) throws InterruptedException { | |
String registerSeller = null; | |
for (int i = 0; i < 100; i++) { | |
long start = System.currentTimeMillis(); | |
new Thread(() -> { | |
try { | |
userRegistrationResilience4j.registerSeller(sellerDto); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
}, "service-call").start(); | |
Thread.sleep(50); | |
} | |
return registerSeller; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment