Skip to main content

Product: OpenFusion Notification Service

Version: 2.5/3/4

 

Description:

How many threads are needed for the Notification Service?

 

Resolution:

The thread model used by the Notification Service depends on the version of OpenFusion you are using.

  • OpenFusion v4 :
    • One thread for the Scheduler. The Scheduler is internal to the Notification Service and is responsible for scheduling event delivery.
    • Each channel that has MaxMemoryUsage set to non-zero will have a MemoryManager thread. One EventLoop thread per channel. This passes the events to the proxy supplier.
    • Each proxy supplier has an EventLoop thread to pass events to the consumer.
    • Besides these threads that are used within the service, ORB will create a worker thread for each incoming direct call; i.e. calls from a client to the ORB. These calls will be from push suppliers and pull consumers. (For pull suppliers and push consumers, the calls are from the notification service to the client and hence are outgoing and not incoming.)
  • OpenFusion v3/ v2.5
    • 1 thread for the Scheduler. The Scheduler is internal to the Notification Service and is responsible for scheduling event delivery.
    • 1 thread, shared by all channels, to handle changing subscriptions and offers.
    • Each channel will use a thread to pass events to the proxy push suppliers. The channel does not own this thread directory; it obtains a thread from the thread pool when there is an event to pass on, and releases the thread afterwards.
    • 1 thread for each connected proxy pull consumer. The thread is created when the proxy and its pull supplier are connected by calling the connect_pull_supplier() method.
    • A maximum of 1 thread for each proxy push supplier, which deals with passing incoming events to the consumer when they arrive from the channel.
    • Each connected typed proxy pull consumer creates a thread for each non-polling method in the interface (i.e. the methods that don't start with "try_"). As with the untyped proxy pull consumers, these threads are created when the pull supplier is connected by calling connect_pull_supplier().
    • Besides these threads that are used within the service, ORB will create a worker thread for each incoming direct call; i.e. calls from a client to the ORB. These calls will be from push suppliers and pull consumers. (For pull suppliers and push consumers, the calls are from the notification service to the client and hence are outgoing and not incoming.)


#KnowledgeDocs
#OpenFusion
#OpenFusionCORBAService
#notificationservice