publish-explicitkey
Including the basic AMPS library:
#include <amps/ampsplusplus.hpp>
Constructing the command:
AMPS::Command cmd(AMPS::Message::Command::Publish);
// Set the topic and data (required)
cmd.setTopic(topic).setData(data);
// Set the SOW key
cmd.setSowKey(refKey);
The command can now be used in executeAsync with a default-constructed (empty) MessageHandler.