Delta Subscribe

To delta subscribe, you simply use the delta_subscribe command as follows:

// assumes that client is connected and logged on

Command cmd("delta_subscribe");
cmd.setTopic("delta_topic");
cmd.setFilter("/thingIWant = 'true'");

for (auto m : client.execute(cmd))
{
    // Delta messages arrive here
}

As described in the AMPS User Guide section on Receiving Only Updated Fields, messages provided to a delta subscription will contain the fields used to generate the SOW key and any changed fields in the message. Your application is responsible for choosing how to handle the changed fields.

Last updated