Delta Subscribe

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

# assumes that client is connected and logged on

cmd = AMPS.Command("delta_subscribe")
cmd.set_topic("delta_topic")
cmd.set_filter("/thingIWant = 'true'")

for m in 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