burakalpugan
Hi,
I feel close but couldn't happen to pass this step:
I've created a java adapter based on PorftolioDemo adapter example which polls a database and returns the records. Initially, it returns these records (which the client isn't aware of these items' names) successfully with "ADD" command to the table created as such below:
var newTable = new DynaMetapushTable("spot", schema, "COMMAND");
newTable.setSnapshotRequired(true);
newTable.setPushedHtmlEnabled(false);
newTable.setClearOnDisconnected(true);
newTable.onChangingValues = updateItem;
newTable.setMaxDynaRows("UNLIMITED");
newTable.setMetapushFields(2, 1);
newTable.setMetapushSort(5, true);
"UPDATE" and "DELETE" commands also run on this metapushtable.
However, I couldn't succeed one thing: if a new record is inserted to the database i try to push this record to the client with the "ADD" command using listener.update. And the client doesn't receive anything with the below warning coming from the adapter:
< WARN> Unexpected update for item spot39
Any advices are welcome and thanks in advance,
Burak.
Mone
Hello,
the message < WARN> Unexpected update for item spot39 is shown when Lightstreamer server is feeded with an update for an item that is not subscribed to.
Looking at your client code it seems that you subscribe to the spot item, not to the spot39 one. Do you change the item name in the MetaData adapter?
If not, note that each update for a COMMAND subscription must be sent to the same item (spot) and spot39 should be just the value of the key field.
In the other case, please, could you send us a server log showing the issue so that we can better understand what happens?