The IOpenfeedClient.subscribe
method allows you to subscribe to individual symbols and exchanges, depending on your needs.
Subscriptions by symbol are the most lightweight as they only subscribe to a few symbols at a time. Subscriptions by exchanges will subscribe to everything on a single exchange at once.
To subscribe to just a few symbols, all you need is to pass the list of symbols in the Subscribe method symbols argument:
client.subscribe(Service.REAL_TIME, SubscriptionType.ALL, 1, ["MSFT", "GOOG"]);
To subscribe to a data coming from an exchange wholesale, pass the list of exchanges you are interested in in the call to Subscribe:
client.subscribe(Service.REAL_TIME, SubscriptionType.ALL, 1, null, null, ["CME"]);