asynchronous request with callback in Apigee -
how can implement asynchronous callback scenario in apigee.
for example need call host , host may take time process response. once response ready needs delivered caller/client.
thanks in advance
regards
can not claim standard way of doing this, here design:
assumption: target host must support registering call url.
when client calls apigee proxy, apigee proxy in middle can generate unique callback url , send target parameter when making api request. in meantime have block client ( , start polling internal storage).
the callback url proxy in apigee receives response target side , updates entry in apigee persistence store, being polled first proxy.
if callback happens within x seconds, apigee proxy can send response client. if not happen within time can send error.
to implement can use key value map or caching policy in apigee transient persistence store. , blocking client , polling persistence store use java or javascript policies
Comments
Post a Comment