Skip to main content

subscribe-bookmark-resume

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)

// Comma-delimited list of subscriptions to resume together
.setSubId(subIdList)

// Set "resume" (and any other options needed to match original subscriptions)
.setOptions(Message.Options.Resume)
;

The command can now be used in execute or executeAsync.