0

I am using amdatu and using the osgi event listener for multiple bundle the issue is when i create more thread the event handler is working but its giving the response with time delay

So any know about this issue , say a fix

  • Without a much more detailed description of what you're doing I have no clue what issue you are running into and how to fix it. Could you please describe what you are trying to do, the steps to reproduce this and, if possible, a simple example that demonstrates this. – Marcel Offermans Nov 16 '15 at 07:09
  • Example : I have 2 event listener one will do the VM creation JOB in cloud Another event is just a ping pong call to check system up status The Issue is when the first event listener is called and the VM job are processing and in the middle when i call the ping pong , the event is published but the listener is listening with more time delay, Is there any config to process all event in parallel? – Gowtham Ravichandran Nov 23 '15 at 07:38

1 Answers1

1

In Amdatu, Apache felix event admin is the default event handler.

You have to increase the Thread Pool Size property (org.apache.felix.eventadmin.ThreadPoolSize)

Find the following in Felix Event admin documentation.

The Apache Felix Event Admin implementation is trying the deliver the events as fast as possible. Events sent from different threads are sent in parallel. Events from the same thread are sent in the order they are received (this is according to the spec). A timeout can be configured which is used for event handlers. If an event handler takes longer than the configured timeout to process an event, it is blacklisted. Once a handler is in a blacklist, it doesn't get sent any events anymore.

The size of the thread pool used for event delivery. The default value is 20. Increase in case of a large amount of events. A value of less then 2 triggers the default value. If the pool is exhausted, event delivery is blocked until a thread becomes available from the pool. Each event is delivered in a thread from the pool unless the ignore timeouts is configured for the receiving event handler.