Talend mediation route: how to persist a variable between exchanges

Highlighted
Six Stars

Talend mediation route: how to persist a variable between exchanges

Hi, 

 

I have a route where I want to get access_token once, store it in a static variable and re-use it between exchanges. I couldn't use context variables for this, as modifying context variable didn't work ( doesn't persist the modified data ). 

looked into camel properties component, but looks like that is more for storing endpoints. 

 

please suggest how to have a static variable that can be modified and persistent across exchanges for a route. A solution that involves spring is fine too. 

 

thanks,

Sowjanya.

Highlighted
Eight Stars

Re: Talend mediation route: how to persist a variable between exchanges

You can write a bean and use a static variable in it.

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