ManKeer
I'm getting the following error message:
Unexpected UPDATE command in snapshot for key KEY1. Event propagated in an inconsistent way.
Dario Crivelli
We are aware only of similar messages, of this form:
- Unexpected UPDATE command in snapshot for key xxxx
- Unexpected UPDATE event for key xxxx
- Unexpected update for item xxxx on yyyy
Please clarify if you refer to one of these; or please specify the Server version.
ManKeer
I have updated the original post
Dario Crivelli
When the Data Adapter feeds an item subscribed to in COMMAND mode, it has to provide the "snapshot" first, then the real time updates.
Since this kind of item represents a table, by "snapshot" we mean the current contents of the table at the time of subscription.
By convention, these current contents have to be supplied as a sequence of ADD commands, one for each row (i.e. key) in the table.
After that, you should send an "end of snapshot" notification; at this point you can supply ADD, UPDATE, and DELETE commands to reflect real time updates.
You must have sent an UPDATE command before the "end of snapshot" notification, which makes no sense for Lightstreamer Server.
ManKeer
Thank you Dario for your suuport,
I have figured out the cause of this problem, I'm using smartUpdate with isSnapshot set to true in all cases, my solution is to pass true for the first call smartUpdate, after that I have passed the isSnapshot with false, and the Unexpected UPDATE command totally disappeared.
Dario Crivelli
Yes, I confirm that you can just use the isSnapshot flag properly and you don't need to send the end-of-snapshot notification, which is optional.
Just note that if you don't send the end-of-snapshot notification, the client won't receive, in turn, the end-of-snapshot notification, until the first real-time update is produced. Obviously, this may not be important in your case.