Thanks for your help. I am working as server side developer.
I am working on the 4 micro services (customer,address,email,phone) in my current project.
I need to implement the search in a fashion that if end user enter any of the search criteria (i.e. customer info, address info, email , phone) , mesh up logic should be capable of giving correct result. The payload is shown below
{customer: { firstname:“abc”, “lastName”:“sdg”, “ssn”:“514”},
address:{“street” :“” ,city:“”},
phone:{phonenumber:“1424”,
email:{“emailId":"test@abc.com”}
}.
Each address, phone and email is linked to customer using a customer Id.
Customer id is foreign key in address, email, phone tables and primary key in the customer table
address data is in address DB, email in Email db, phone in phone DB and customer in customer DB (Repository pattern of spring boot is used that’s why separate DB for separate service)
Current implementation scenario is explained below
I am passing “address”:{“street”:“3rd Block”} as my request from postman. I am tracking the request in the trace tab after proxy creation and deployment. In the develop tab, I Introduced Service callout Policy to proxy as soon as I am receiving the request. After getting the service response, I retrieved the customerID from the response using Extract Message Policy. After that I used the JS policy to set the customerID in the context. Then again service call out policy is introduced to call the particular customer . I get the response also .
-
How to merge these two responses?
-
How to implement mesh up for all conditions i.e. combination of the customer, address, phone , email?
3.How to introduce pagination i.e. which policy support pagination feature?
- How to pass the PathParam in the request in the service call out policy?