The Zurich release has arrived! Interested in new features and functionalities? Click here for more

ECC queue processing - How to distinguish response for different instances of the same API call?

KrithikaV
Tera Expert

Hi,

 

I have a doubt in the ecc_queue processing. If a Rest api call has to be made with a specific user action - say Add button click.

Scenario: 

The  user add a row and clicks the Add button. API call is triggered. The topic name is 'TopicA'.
The user immediately adds another row and clicks the Add button again. Another API call is triggered. The topic is Topic A again (as the same API code is getting executed again).
I have a required that based on the API response, I need to update a column in the added row. In the ecc_queue table, I see two rows with the same topic and source entry. How do I distinguish which row has the payload for the first API call and which row has the payload for the second API call? 
I am not sure I can use the 'Sequence' column in the ecc_queue table as the response may arrive in any order. How do I ensure that I process the responses correctly.

Thanks,

Krithika

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@KrithikaV You can choose to include a unique id/correlation id/sys_id within the request payload. Your API response must include this unique id/correlation id in the response payload. With the help of this unique id, you can correlate between a response and the target record.

View solution in original post

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@KrithikaV You can choose to include a unique id/correlation id/sys_id within the request payload. Your API response must include this unique id/correlation id in the response payload. With the help of this unique id, you can correlate between a response and the target record.