How are you declaring the Data Service on the client side? Do you have the consumer subscriptions on the DataService set to "test_room" in order to get the updates? Refer to the LCDS 3.1 documentation here for details for how to do it.
I am sure the consumer on client was set correct.
Because removeItemFromFill and deleteItem all worked!
From the manual sync document
"Note: When you manually route messages, you cannot use the autoRefresh fill capability. Instead, if you want to update fills you must put in calls to manually manage fill membership."
addItemToFill and removeItemFromFill are methods to manage fill membership, but createItem runs refreshFill to evaluate the new item
createItem API doc
* You use this method to indicate to to the Data Management Service that a new item
* has been created. The Data Management Service goes through all sequences currently
* being managed by clients and determine whether this item belongs in
* each sequence. Usually it re-evaluates each fill method to make this
* determination (though you can control how this is done for each fill
* method). When it finds a sequence that contains this item, it
* then sends a create message for this item to each client subscribed
* for that sequence.
createItem requires auto-sync and refreshFill. It doesn't like the addItemToFill or removeItemToFill. It is the reason why you cannot find fillParameters in the createItem signature.
In fact, in manualsync only the subtopics set by setProducerSubtopics
control messages routing,
"fill" parameter is useless at all.
Do you mean that dst.addItemToFill(destination, ["abc"], 0, item) makes the item go into both collections where there are 2 fills on client?
Thanks for bringing this up. I just tested addItemToSync using different sets of fillParameters.
I had fill(collection1, "abc") and fill(collection, "123");
I called with "abc", I got a message event and the "abc" filled collection updated(not the "123 filled collection"). It was correct.
I called with "123", nothing happened on "abc" filled collection. It was correct.
I call dst.addItemToFill(destination, ["ijk"], 0, item); I thought I was not going to get any message event, but I did.
I am going to discuss with the Dev. I think this should not happen.
You are right, the setProducerSubtopics control the messages routing no matter that the client has collection which matches the addItemToFill's fillparameters. I thought it was too many messages send to client if the client didn't have the relevant fill. However, it is how it works. It is same as the createItem. If you had a message event handler, you could handle the message by the dst.createItem. For createItem message, the client's dataservice didn't handle this message since there was no indication how this item related to any of its fills.