RestApi that can wait to do some action

Highlighted
Five Stars

RestApi that can wait to do some action

Hello guys and girls

 

I have to develop an API Rest but I'm a bit a stuck.

I need to send data to this api, then it will do some things on it and send this restructured data to a service.

But some times I need to pause my API because this service is unavailable. I need to keep the data during unavailable time and send them when the service is up again.
btw, I know when the Service is up or down

 

Can someone help me somehow.

Tags (2)

Accepted Solutions
Thirteen Stars

Re: RestApi that can wait to do some action

I use 2 methods, maybe could be useful for you:

 

1) API endpoint support maintenance mode response, when need I add change settings from 0 to 1 and endpoint start return to application "system in maintenance mode", in this cease application make retry later. This is required additional logic on the application side

 

2) the second method - instead of API use message queue, in this case, application, does not call API, but put a message in the queue

it fully asynchronous method - response comes in a different queue and not always in the same order, application put message and from time to time (or continuously ) get messages from response queue, check for what original message this response and etc.

 

in both cases, we could stop the central system for maintenance or for bulk processes (like monthly billing and invoicing) 

-----------

All Replies
Thirteen Stars

Re: RestApi that can wait to do some action

I use 2 methods, maybe could be useful for you:

 

1) API endpoint support maintenance mode response, when need I add change settings from 0 to 1 and endpoint start return to application "system in maintenance mode", in this cease application make retry later. This is required additional logic on the application side

 

2) the second method - instead of API use message queue, in this case, application, does not call API, but put a message in the queue

it fully asynchronous method - response comes in a different queue and not always in the same order, application put message and from time to time (or continuously ) get messages from response queue, check for what original message this response and etc.

 

in both cases, we could stop the central system for maintenance or for bulk processes (like monthly billing and invoicing) 

-----------

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads