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
Highlighted
Forteen 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) 

-----------

View solution in original post


All Replies
Highlighted
Forteen 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) 

-----------

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read