Skip to content

avanishbharati/ChuckNorrisJokesSplitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel processing response, service integration, using Spring Boot, Apache Camel and WebTestClient

This project demonstrates how to merge results after asynchronous calls to multiple services using Apache Camel splitter technique. As a mock service, we will be calling the Internet Chuck Norris Database twice, in parallel and merging the jokes data responses into one result.

Swagger

http://localhost:8080/chucknorrisjokessplitter/api/v1/api-doc Import into PostMan for further information

Service endpoint

Sample request:

{"firstName":"Tom","lastName":"Hanks"}

POST to http://localhost:8080/chucknorrisjokessplitter/api/v1/chucknoriss/jokes

For single response POST to http://localhost:8080/chucknorrisjokessplitter/api/v1/chucknoriss/jokes

Sample response:

[{"type":"success","value":{"id":438,"joke":"Tom Hanks likes his ice like he likes his skulls: crushed.","categories":[]}},{"type":"success","value":{"id":132,"joke":"An anagram for Walker Texas Ranger is KARATE WRANGLER SEX. I don't know what that is, but it sounds AWESOME.","categories":[]}}]

Test

WebTestClient is used to test the API

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Releases

No releases published

Packages

No packages published

Languages