Skip to main content

subscribe-bookmark

Import the AMPS library:

import AMPS

Construct the command:

cmd = AMPS.Command(AMPS.Message.Command.Subscribe)
cmd.set_topic(topic)

# Set consistent ID for recovery purposes
cmd.set_sub_id(subId)

# Start at the recovery point in the bookmark store
cmd.set_bookmark(AMPS.Client.Bookmarks.MOST_RECENT)

The command can now be used in execute or execute_async.