<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re-subscribing &amp; tRestRequest in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Re-subscribing-tRestRequest/m-p/2322413#M92361</link>
    <description>Trying to consume a subscription of events, but have a problem to resubscribe if there is a timeout or a restart on the remote system.
&lt;BR /&gt;Essentially have 2 tasks...
&lt;BR /&gt;1. Send Subscription request via tRest
&lt;BR /&gt;2. Consume subscription via tRestRequest/tRestResponse.
&lt;BR /&gt;Looking for a suggestion in how to trigger the 1st task, if we haven't received a heartbeat in 
&lt;I&gt;x &lt;/I&gt;seconds?
&lt;BR /&gt;My thought right now is to create a second job to check if there is a current heartbeat, if not received, then send subscription request.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Rod
&lt;BR /&gt;( Note -&amp;nbsp;on Open-source ESB )</description>
    <pubDate>Sat, 16 Nov 2024 10:27:15 GMT</pubDate>
    <dc:creator>rod</dc:creator>
    <dc:date>2024-11-16T10:27:15Z</dc:date>
    <item>
      <title>Re-subscribing &amp; tRestRequest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Re-subscribing-tRestRequest/m-p/2322413#M92361</link>
      <description>Trying to consume a subscription of events, but have a problem to resubscribe if there is a timeout or a restart on the remote system.
&lt;BR /&gt;Essentially have 2 tasks...
&lt;BR /&gt;1. Send Subscription request via tRest
&lt;BR /&gt;2. Consume subscription via tRestRequest/tRestResponse.
&lt;BR /&gt;Looking for a suggestion in how to trigger the 1st task, if we haven't received a heartbeat in 
&lt;I&gt;x &lt;/I&gt;seconds?
&lt;BR /&gt;My thought right now is to create a second job to check if there is a current heartbeat, if not received, then send subscription request.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Rod
&lt;BR /&gt;( Note -&amp;nbsp;on Open-source ESB )</description>
      <pubDate>Sat, 16 Nov 2024 10:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Re-subscribing-tRestRequest/m-p/2322413#M92361</guid>
      <dc:creator>rod</dc:creator>
      <dc:date>2024-11-16T10:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Re-subscribing &amp; tRestRequest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Re-subscribing-tRestRequest/m-p/2322414#M92362</link>
      <description>Hi &amp;nbsp; 
&lt;BR /&gt;1. Using tRestCient to call the Rest web service, there are two parameters: connection time out and Receive time out in the advanced settings panel, the job will fail once the time out reach. 
&lt;BR /&gt;2. Using tLoop with While model to iterate the child job many times until the calling is successfully, the job design looks like: 
&lt;BR /&gt;main job: 
&lt;BR /&gt;tloop--iterate--tRunJob--oncomponent--tJava 
&lt;BR /&gt;Define a context variable called condition that will be used as condition on tLoop. 
&lt;BR /&gt;tRunJjob: call the child job, uncheck the 'die on error' option. 
&lt;BR /&gt;on tJava: 
&lt;BR /&gt; 
&lt;PRE&gt;String status = myRoutine.getValue();&lt;BR /&gt;if(status!=null&amp;amp;&amp;amp;status.equals("failed")){&lt;BR /&gt;context.condition=true;&lt;BR /&gt;}else{&lt;BR /&gt;context.condition=false;&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;Refer to this 
&lt;A href="https://help.talend.com/pages/viewpage.action?pageId=190513260" target="_blank" rel="nofollow noopener noreferrer"&gt;article &lt;/A&gt;to learn how to define a global variable that can be accessible from different job. 
&lt;BR /&gt;child job: 
&lt;BR /&gt;tRestClient--onsubjoberror--tJava 
&lt;BR /&gt;tRestClient: uncheck the 'die on error' option. 
&lt;BR /&gt;on tJava: 
&lt;BR /&gt; 
&lt;PRE&gt;myRoutine.setValue("failed");&lt;/PRE&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 17 Aug 2016 09:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Re-subscribing-tRestRequest/m-p/2322414#M92362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-17T09:19:08Z</dc:date>
    </item>
  </channel>
</rss>

