I do not know the solution to your question, but I did find similar KB Articles for you that might help.
-
This is not a bug. As per design, the Dispatcher is initialized at very beginning of IS startup but it actually starts its activity of sending towards Broker and receiving events from Broker after all the packages are loaded.
Dispatcher needs the namespace to be loaded before starting the receiving and sending the events. In startup service, we can’t wait for the Dispatcher to start because for the Dispatcher to start the namespace should be loaded.
-
There is no easy fix for this issue unfortunately. Here is one workaround that has been used.
If you see the server�s logs at startup you will see an early entry that says
Dispatcher initialized
Then all the packages are loaded and startup services called. Then another entry in the logs says
Dispatcher started.
The dispatcher is actually ready to start publishing only after the second entry in the logs shows up i.e. after executing all the startup services. This is because the publish steps cannot happen unless all the documentTypes are loaded which means the server has to wait for all the packages to load and then start the Dispatcher.
In short, startup services cannot publish documents to the broker. Unfortunately, the server loads all the packages and run the startup services in a single thread. So if you put the publish call in a loop to wait till it succeeds, the Integration Server will hang at that service and never startup.
There is a workaround this problem. It is to have your service startup service invoke the publish step in a separate thread. The easiest way is to use Service.doThreadInvoke. Since the Service Threads are allocated once the server is completely up (meaning the Dispatcher is also up) the publish step will succeed in the other thread.
Also, you can decide to use a foolproof mechanism by creating a service that sleeps for a few seconds and publishes the document and put these steps in a RETRY loop. And then call this service from the startup service using Service.doThreadInvoke.
#Integration-Server-and-ESB#webMethods