Hello, so the use case is as follows 1. user application will call the APIGW which will forward the request to the backend application.2. backend application responds on a callback link configured at its end.3. Is there a way we can configure the APIGW link as the callback link the backend application on which the backend application will respond and then APIGW will forward that response to the user application.
user application ->APIGW-> backend application.
backend application (what callback url will be defined w.r.t APIGW) ->APIGW -> user application
Yes, you can achieve your requirement, you don't need any special feature of Apigee to achieve this.
When you use the word callback over http , it does not fit the standard request-response paradigm anymore. It basically means that there are two distinct requests involved.
Request 1: User Application > Apigee > Backend Application
Request 2: Backend Application > Apigee > User Application
Depending on the semantics of your request :
Now, you could use different endpoints of the same proxy for the first and second request OR you could use different proxies. That would depend on your design and other considerations. Essentially, you are using Apigee exactly the same way in both requests but the direction of the request has been flipped.
You will also need to find a way to relate the request and response (assuming you haven't done it already), you will need to deal with scenarios where a request never gets a callback, gets a duplicate callback and so on.
Hi Rahul, Thankyou for the response.
but there is still some confusion. let me elaborate
Request 1: User Application > Apigee > Backend Application
im using postman to call this apigee api proxy
postman -> post http://a.a.a.a/backendservice/v1/xyz -> backend application
request lands on backend application successfully
now for
Request 2: Backend Application > Apigee > User Application (postman in this case)
what apigee link will I define at backend (this http://a.a.a.a/backendservice/v1/getloc) or ? for the response.
also which policies will help in this scenario?
ty!!
Adding to @rmishra's response, you can relate or correlate the request and response using the "messageid" variable on the original request. Just cache that along with the Apps callback (you may have multiple Apps with different callbacks) and pass the "messageid" to the backend as a "state" variable or something similar. The backend then passes that in the callback to Apigee which then does a Cache Lookup to get the App's callback and so on.
User | Count |
---|---|
6 | |
2 | |
1 | |
1 | |
1 |