Martin,
As I said earlier Claim of 100 tasks and each task will publish 2 events once claim is done and for this process its taking approx. 4 min. By the way when I look into the source code, I notice that, only one thread Thread-X is taking care of all claiming all 100 tasks one by one and publishing n-claim events. Most the process time is spent by the Thread-X at events publishing.
As of now, I am separate out publishing into a new Therad in TaskListener Implementer notice() method. With this change, claiming 100 tasks duration bring down to 30seconds. Instead of this, Is it correct way to separate out the publishing events into a new Thread at TaskEntity level itself??
Thanks,
Swamy.