Skip to main content

sow-topn

Including the basic AMPS library:

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

Constructing the command:

Command cmd = new Command(Message.Command.SOW)
.setTopic(topic)
.setOptions(Message.Options.TopN(5))
.setOrderBy("/name ASC, /orderId DESC")
;

The command can now be used in execute or executeAsync.