If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Command Mode : Two-level push

I want to conform whether itemUpdate can be limited for client to receive only UPDATE and DELETE event, since in my case the items for in ADD has no Data other than item Key since our application has lot of Items to be ADDed we are finding ways to ignore it. can you please suggest is that an expected behavior or we can do some work around to limit the item updates using selector or something else..

Please consider that ADD events for the Two-level push are of crucial importance and can not be prevented from being sent to the clients.
Indeed, the ADD event triggers in the client library the subscribe to the Item of the second level. If the client does not receive the ADD no second level data will be received.

They payload of an ADD event is very small, so it should not be a problem.
But maybe in your scenario you have a such big burst of ADD events which causes performance problems? In this case you have two options:

- give up the two-level push and fall back in the case of simple COMMAND.
Unfortunately with a two separate adapters it's a bit complicated, as you should coordinate the two to aggregate the add/remove information with the market data.

- give up the COMMAND mode at all. You could simply rely on MERGE Items. To handle a dynamic list of items the clients should subscribe you could use a symbolic group name as Item name.
So the list of Items to be pushed to the client can be determined by your Metadata Adapter via the getItems call.

Did your application use one of our view widgets (Static Grid, Dyna Grid, Chart)?
In this case there is no way to prevent them from receiving and managing ADD events. Otherwise, if you rely on onItemUpdate of SubscriptionListener, you have complete freedom in sending to the UI only certain updates.

About the two options I proposed:

1) We have several demos showing the simple COMMAND mode (only one level), starting from the basic-portfolio-demo. But in your case, if I have understood correctly, the tricky part is to combine information from the DATA Adapter with the INIT Adapter.

2) In this case you should leverage the getItems method of Metadata Adapter interface. The client will subscribe a single Item in MERGE mode, but in getItems you will return the actual Item list.
This approach works fine when the composition of the list is static or changes very rarely; since for each change, you must warn the client that should repeat the subscription.