Skip to main content

sow-and-subscribe-history-filter

Including the basic AMPS library:

#include <amps/ampsplusplus.hpp>

Constructing the command:

AMPS::Command cmd(AMPS::Message::Command::SOWAndSubscribe);
cmd.setTopic(topic);

// set the timestamp or bookmark to start from and the filter

cmd.setBookmark("20251231T010101").setFilter("/id > 1");

The command can now be used in execute or executeAsync.