Unique Identifier for each Request

Eight Stars

Unique Identifier for each Request

Is there any "unique" identifier I can capture for all requests received via the tRestRequest? I tried using

((String)globalMap.get("tRESTRequest_1_CORRELATION_ID"))

value, however, it returns a null value.

 

In the log output, I see the following. How can I capture the ID field from here? It seems to be unique tying the request and response together. Any help is appreciated.

INFO: Inbound Message
----------------------------
ID: 2
Address: http://localhost:8088/
Http-Method: GET
--------------------------------------
INFO: Outbound Message
---------------------------
ID: 2
Response-Code: 200
Content-Type: application/json
Headers: {Content-Type=[application/json], Date=[Wed, 01 Nov 2017 15:43:28 GMT]}

Thank you


Accepted Solutions
Community Manager

Re: Unique Identifier for each Request

Switch on "Use Business Correlation" in the tRestRequest and you can use the .......

 

((String)globalMap.get("tRESTRequest_1_CORRELATION_ID"))

All Replies
Community Manager

Re: Unique Identifier for each Request

Switch on "Use Business Correlation" in the tRestRequest and you can use the .......

 

((String)globalMap.get("tRESTRequest_1_CORRELATION_ID"))
Eight Stars

Re: Unique Identifier for each Request

@rhall_2_0 I checked on the "Use Business Correlation" option in tRestRequest. Still, i am getting a null for ((String)globalMap.get("tRESTRequest_1_CORRELATION_ID")).

I am trying to call this after tRestRequest --> tJavaRow

Thanks
Eight Stars

Re: Unique Identifier for each Request

Sorry, false alarm. It works. Turns out I had multiple tRestRequest components (disabled) and the one which was current is tRestRequest_3

I will see how this works for my solution. Thanks again.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch 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