To delta publish, you use the delta_publish command as follows:
/* assumes that client is connected and logged on */
String msg = ... ; // obtain changed fields here
client.deltaPublish("myTopic", msg);
The message that you provide to AMPS must include the fields that the topic uses to generate the SOW key. Otherwise, AMPS will not be able to identify the message to update. For SOW topics that use a User-Generated SOW Key, use the Command form of delta_publish to set the SowKey.
/* assumes that client is connected and logged on */
String msg = ... ; // obtain changed fields here
String key = ... ; // obtain user-generated SOW key
Command cmd("delta_publish");
cmd.setTopic("delta_topic");
cmd.setSowKey(key);
cmd.setData(msg);
/* Execute the delta publish. Use an empty
* a message handler since any failure acks will
* be routed to the FailedWriteHandler
*/
client.executeAsync(cmd,MessageHandler());