subscribe-bookmark-filter
Including the basic AMPS library:
#include <amps/ampsplusplus.hpp>
Constructing the command:
AMPS::Command cmd(AMPS::Message::Command::Subscribe);
cmd.setTopic(topic);
cmd.setFilter(filter);
// Set consistent subId for recovery purposes.
cmd.setSubId(subId);
// Start from the recovery point in the bookmark store
cmd.setBookmark(AMPS::Client::MOST_RECENT());
The command can now be used in execute or executeAsync.