Skip to main content

sow-and-sub-paginated

Including the basic AMPS library:

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

Constructing the command:

Command cmd = new Command(Message.Command.SOWAndSubscribe)
.setTopic(topic)
.setOrderBy("/id DESC")
.setOptions(Message.Options.TopN(20) +
Message.Options.SkipN(30) +
Message.Options.OOF)
;

The command can now be used in execute or executeAsync.