After stop Talend Job(TJ) bundle by bundle:stop command, TJ stops and writes a similar message to the log
Destroying BlueprintContainer for bundle ... Service ... removed Removing job ...
But threads from thread pool TJ is continued running and write to log messages.
Why? How to kill this zombies?
When you deploy a bundle (or a feature) there are often other bundles that are created. You can see this if you use bundle:list before deploying a new bundle, then using it again after the bundle has been deployed. I suspect what is happening is that you have not stopped all linked bundles. It is hard to be sure since I'm not looking at your karaf, but that would be my first thought
OK, can you supply your log file to show what is happening? How do you know that "pool-35-thread-2" is linked to your job?
You do realise that you do not need to run Talend Jobs in the Runtime? While you can run them there, Jobs are batch and therefore it makes more sense to run them outside of the Runtime.
Please, see my real karaf tesb.log:
# command 'start 252' 2020-02-14T20:09:17,236 | INFO | pipe-start 252 | troller.internal.JobLauncherImpl 149 | 233 - org.talend.esb.job.controller - 6.4.1 | Adding job Sync_Bill2CRM_Test2. 2020-02-14T20:09:17,237 | INFO | pool-35-thread-2 | internal.SimpleJobTask$JobRunner 69 | 233 - org.talend.esb.job.controller - 6.4.1 | Starting job Sync_Bill2CRM_Test2 2020-02-14T20:09:47,440 | INFO | pool-35-thread-2 | m_queue_0_12.Sync_Bill2CRM_Queue 1694 | 252 - lovitmain.Sync_Bill2CRM_Test2 - 0.5.0 | Working... # command 'stop 252' 2020-02-14T20:09:55,101 | INFO | pipe-start 252 | nt.container.BlueprintExtender$3 323 | 22 - org.apache.aries.blueprint.core - 1.8.0 | Destroying BlueprintContainer for bundle lovitmain.Sync_Bill2CRM_Test2/0.5.0 2020-02-14T20:09:55,104 | INFO | pipe-start 252 | r.internal.JobTracker$Customizer 133 | 233 - org.talend.esb.job.controller - 6.4.1 | Service lovitmain.sync_bill2crm_test2_0_5.Sync_Bill2CRM_Test2@4d2f17ca removed 2020-02-14T20:09:55,104 | INFO | pipe-start 252 | troller.internal.JobLauncherImpl 156 | 233 - org.talend.esb.job.controller - 6.4.1 | Removing job Sync_Bill2CRM_Test2. 2020-02-14T20:10:17,477 | INFO | pool-35-thread-2 | m_queue_0_12.Sync_Bill2CRM_Queue 1694 | 252 - lovitmain.Sync_Bill2CRM_Test2 - 0.5.0 | Working...
At 2020-02-14T20:10:17,477 the pool-35-thread-2 continue running, but Sync_Bill2CRM_Test2 was Resolved in karaf shell at bundle:list
Why? How I do fix it?
I'm afraid I have not seen this behaviour before. However, I only run routes and services within the Karaf. What does your job do? I assume that it is a batch job and will run until it has finished, then stop. Or have you built it to run continuously? If it has been built to run continuously, this *might* be the problem. Talend jobs are meant to start and stop and not run continuously. Talend Routes are meant for realtime, continuous processing.
My job read from DB and write to REST by http in infinite loop.
If take out a infinit loop logic to external route, a job logic is stopped as needed.
Sorry I have been away for a few days. If you want to add the infinite loop back in, you can do it using a route. Keep your DB Read and REST Write in a job that just does that. Then create a Route, use a cTimer to get the route to create an exchange every second (or however often you want) and connect it to a cTalendJob that calls the job I described above. This link here should give you the idea....
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to use an API-First Approach to Modernize your Applications
Take a look at this technical overview video of Talend API Designer
Find out how to get started with APIs