Skip to main content

subscribe-conflated-key

Import the AMPS library:

import AMPS

Construct the command:

cmd = AMPS.Command(AMPS.Message.Command.Subscribe)
cmd.set_topic(topic)
cmd.set_options(AMPS.Message.Options.Conflation("1s") + AMPS.Message.Options.ConflationKey('/id'))

The command can now be used in execute or execute_async.