OmmConsumerClient Registration Count Recommendation

mzmuda33
mzmuda33 Newcomer

Within a consumer application, should a single OmmConsumerClient instance be used to handle all OmmConsumer::registerClient() for every single item the application will register for?

Or is there a recommendation to split this up to multiple instances of OmmConsumerClient?

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @mzmuda33

    A single OmmConsumerClient instance is usually sufficient to handle your subscription requirements. That being said, it entirely depends on your application and the machine you intend to run your application. If you are running an application that handles thousands of subscriptions and the post-processing within the callbacks is consuming a significant amount of CPU, the application can potentially suffer from a "slow consumer" scenario where the internal dispatching cannot keep up with the volume of data coming down your connection. Applications do have the ability to control dispatching by choosing an alternate operation model. See the discussion within section 2.4 Product Architecture within the Developer's Guide.

    In the situation where your machine contains multiple cores and your application would like to take advantage of them, you can refer to the Horizontal Scaling example.

Answers