Skip to main content

subscribe-conflated-key

Including the basic AMPS library:

import com.crankuptheamps.client.*;
import com.crankuptheamps.client.exception.*;

Constructing the command:

Command cmd = new Command(Message.Command.Subscribe)
.setTopic(topic)
.setOptions(Message.Options.Conflation("1s")
+ Message.Options.ConflationKey("/id"))
;

The command can now be used in execute or executeAsync.