How do I set the CorrelationId when I publish a message?
To set the CorrelationId
on a message, use the Command interface to create the appropriate publish command and then use the executeAsync
method on the client to send the command to AMPS.
For example, the following snippet shows one way to use this interface in Java:
One important point: the CorrelationId
can only contain characters that are valid in Base64 encoding. Otherwise, AMPS may report a parse error when trying to interpret the publish command.
See the Developer Guide for your client of choice for more information on the Command interface and recipes for using the Command interface with AMPS.
Last updated