Skip to main content

publish-explicitkey

Including the basic AMPS library:

using AMPS.Client;
using AMPS.Client.Message;
using AMPS.Client.Exceptions;

Constructing the command:


// Set topic and data (required)
Command cmd = new Command(Message.Command.Publish)
.setTopic(topic)
.setData(data);

// Set SOW key
cmd.setSowKey(refKey);

The command can now be used in executeAsync with a null message handler.