public static final class Message.Options
extends java.lang.Object
Command c = new Command("sow_and_subscribe") .setOptions(Message.Options.OOF + Message.Options.NoEmpties) // other parameters for command here ;For options that take a list of parameters, this class provides convenience constructors to format the list.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
Cancel
Constant string for the
cancel option, used
when acknowledging (sow_delete ) a leased message
to return the message to the queue rather than acknowledging
the message as processed. |
static java.lang.String |
Expire
Constant string for the
expire option, used
when acknowledging (sow_delete ) a leased message
to immediately expire the message from the queue rather than
acknowledging the message as processed. |
static java.lang.String |
FullyDurable
Constant string for the
fully_durable option. |
static java.lang.String |
Live
Constant string for the
live option. |
static java.lang.String |
NoEmpties
Constant string for the
no_empties option. |
static java.lang.String |
None |
static java.lang.String |
NoSowKey
Constant string for the
no_sow_key option. |
static java.lang.String |
OOF
Constant string for the
oof (out of focus) option. |
static java.lang.String |
Pause
Constant string for the
pause option. |
static java.lang.String |
Replace
Constant string for the
replace option. |
static java.lang.String |
Resume
Constant string for the
resume option. |
static java.lang.String |
SendKeys
Constant string for the
send_keys option. |
static java.lang.String |
Timestamp
Constant string for the
timestamp option. |
Constructor and Description |
---|
Options() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
AckConflationInterval(java.lang.String interval)
Formats the
ack_conflation interval for a logon command. |
static java.lang.String |
Conflation(java.lang.String conflation)
Formats the
conflation option for a command. |
static java.lang.String |
ConflationKey(java.lang.String conflationKey)
Formats the
conflation_key option for a command
that uses the conflation option. |
static java.lang.String |
Grouping(java.lang.Iterable<java.lang.String> grouping)
Formats the
grouping option for an
aggregated subscription, which specifies how to determine
which records to aggregate together. |
static java.lang.String |
Grouping(java.lang.String grouping)
Formats the
grouping option for an
aggregated subscription, which specifies how to determine
which records to aggregate together. |
static java.lang.String |
MaxBacklog(int maxBacklog)
Formats the
max_backlog option for a command,
used when subscribing to a queue. |
static java.lang.String |
Projection(java.lang.Iterable<java.lang.String> projection)
Formats the
projection option for an
aggregated subscription, which specifies the fields produced
by the aggregation. |
static java.lang.String |
Projection(java.lang.String projection)
Formats the
projection option for an
aggregated subscription, which specifies the fields produced
by the aggregation. |
static java.lang.String |
Rate(java.lang.String rate)
Formats the
rate option for a command,
used to slow down the rate of a bookmark replay. |
static java.lang.String |
RateMaxGap(java.lang.String rateMaxGap)
Formats the
rate_max_gap option for a
command, which can be used when a bookmark replay specifies
a relative rate . |
static java.lang.String |
Select(java.lang.Iterable<java.lang.String> selectList)
Formats the
select option for a subscription
or SOW query, which specifies the fields produced
in the delivered messages. |
static java.lang.String |
Select(java.lang.String selectList)
Formats the
select option for a subscription
or SOW query, which specifies the fields produced
in the delivered messages. |
static java.lang.String |
SkipN(int skipN)
Formats the
skip_n option for a
sow or sow_and_subscribe command. |
static java.lang.String |
TopN(int topN)
Formats the
top_n option for a command. |
public static final java.lang.String None
public static final java.lang.String Live
live
option.
which requests that a bookmark subscription should receive
messages before they are written to the transaction
log once replay is complete. This could potentially slightly
reduce latency in some configurations, although subscriptions
using this option increase the risk of inconsistent data in
failover situations.public static final java.lang.String OOF
oof
(out of focus) option.
When used with a subscription, the oof
option
requests notification messages when a message that previously
matched the subscription no longer matches the subscription.public static final java.lang.String Replace
replace
option.
When this option is provided on a command, AMPS updates
the existing subscription specified in the
SubIdfor the command rather than creating a new subscription. See the AMPS User Guide for details.
public static final java.lang.String NoEmpties
no_empties
option.
When used with a delta subscription, this option
specifies that AMPS will not create a message to this
subscription when a publish happens that does not change the
value of any field in the message.public static final java.lang.String SendKeys
send_keys
option.
This option is the current server default, and does not
need to be specified. When set, AMPS provides the
key fields for a message along with changed fields in
messages to a delta subscription.public static final java.lang.String Timestamp
timestamp
option.
When specified on a command, AMPS will include the
timestamp header on data messages sent in response
to that command.public static final java.lang.String NoSowKey
no_sow_key
option.
When specified on a command, AMPS will not provide the
SOW key field on messages provided in response to the command.public static final java.lang.String Cancel
cancel
option, used
when acknowledging (sow_delete
) a leased message
to return the message to the queue rather than acknowledging
the message as processed.public static final java.lang.String Expire
expire
option, used
when acknowledging (sow_delete
) a leased message
to immediately expire the message from the queue rather than
acknowledging the message as processed.public static final java.lang.String Resume
resume
option.
This option is to start a set of bookmark subscriptions
that have been entered in a paused state.
See the AMPS User Guide for details.public static final java.lang.String Pause
pause
option.
This option is used to group bookmark subscriptions so
that a set of independent subscriptions can be started simultaneously
and proceed through replay together, typically used for
testing or auditing purposes.
See the AMPS User Guide for details.public static final java.lang.String FullyDurable
fully_durable
option.
This option specifies that a message will not be provided
to a bookmark replay until it has been acknowledged as
persisted by all synchronous replication destinations. The
option is used to provide increased repeatability of bookmark
subscriptions, although it may increase the latency for
current publishes to be delivered to the subscriber due to the persistence
requirement.public static java.lang.String Conflation(java.lang.String conflation)
conflation
option for a command.
This option can be used with subscriptions to topics in the
State-of-the-World to request that AMPS conflate publishes
to the same record. This can reduce bandwidth and processing
requirements for the the subscriber. If a large number
of subscribers will use the same conflation
setting for the same topic, consider configuring a
ConflatedTopic
on the server.
See the AMPS User Guide for details.conflation
- the conflation intervalpublic static java.lang.String ConflationKey(java.lang.String conflationKey)
conflation_key
option for a command
that uses the conflation
option.
This option can be used with subscriptions to topics in the
State-of-the-World to request that AMPS conflate publishes
to messages with a common value for a field or set of fields
that is not the key for the topic.
This option must be used with the conflation
option.conflationKey
- the field or fields to use as a conflation keypublic static java.lang.String TopN(int topN)
top_n
option for a command.
When this option is specified, AMPS will return the
specified number of messages from the results.
See the AMPS Command Reference for
details.topN
- the number of messages to return from the result setpublic static java.lang.String SkipN(int skipN)
skip_n
option for a
sow
or sow_and_subscribe
command.
When this option is provided, AMPS will skip the specified
number of messages before returning the top_n
records specified. See the AMPS Command Reference
and the Developer Guide for details.skipN
- the number of results to skip before beginning to return resultspublic static java.lang.String MaxBacklog(int maxBacklog)
max_backlog
option for a command,
used when subscribing to a queue.
When consuming from a queue, this option sets the maximum
number of messages the client is willing to have outstanding
at a given time. (The actual number of messages provided
is determined by both this parameter and the server
configuration.) See the AMPS User Guide and the
AMPS Command Reference for details.maxBacklog
- the maximum number of messages to provide to this
subscription at a given timepublic static java.lang.String Rate(java.lang.String rate)
rate
option for a command,
used to slow down the rate of a bookmark replay.
When used with a bookmark replay, this option directs
AMPS to slow down the replay to approximately the rate
specified. See the AMPS Command Reference for
details.rate
- the requested rate limit for the bookmark replaypublic static java.lang.String RateMaxGap(java.lang.String rateMaxGap)
rate_max_gap
option for a
command, which can be used when a bookmark replay specifies
a relative rate
. When used with a bookmark replay that
specifies a relative rate (for example, that the replay should be
slowed down to no more than 2X
the original publish
rate), this option sets the maximum amount of time for the replay
to go without producing a message. See the AMPS User Guide
for details.rateMaxGap
- the maximum amount of time without producing a messagepublic static java.lang.String Select(java.lang.String selectList)
select
option for a subscription
or SOW query, which specifies the fields produced
in the delivered messages. This overload of the method expects
a string that contains a comma-delimited list of field directives.
See the AMPS User Guide for details.selectList
- the list of fields to producepublic static java.lang.String Select(java.lang.Iterable<java.lang.String> selectList)
select
option for a subscription
or SOW query, which specifies the fields produced
in the delivered messages. This overload of the method expects a
Iterable
that contains individual field
directives. The method formats the field directives into a
comma-delimited list.
See the AMPS User Guide for details.selectList
- a list of fields to producepublic static java.lang.String Projection(java.lang.String projection)
projection
option for an
aggregated subscription, which specifies the fields produced
by the aggregation. When this option is provided,
a grouping
option must also be provided.
This overload of the method expects a string that
contains a comma-delimited list of projections.
See the AMPS User Guide for details.projection
- the fields to producepublic static java.lang.String Projection(java.lang.Iterable<java.lang.String> projection)
projection
option for an
aggregated subscription, which specifies the fields produced
by the aggregation. When this option is provided,
a grouping
option must also be provided.
This overload of the method expects a Iterable
that contains individual field projections. The method
formats the field projections into a comma-delimited list.
See the AMPS User Guide for details.projection
- a list of fields to producepublic static java.lang.String Grouping(java.lang.String grouping)
grouping
option for an
aggregated subscription, which specifies how to determine
which records to aggregate together. When this option is provided,
a projection
option must also be provided.
This overload of the method expects a String
that contains a comma-delimited list of fields to group
by. See the AMPS User Guide for details.grouping
- the fields to group bypublic static java.lang.String Grouping(java.lang.Iterable<java.lang.String> grouping)
grouping
option for an
aggregated subscription, which specifies how to determine
which records to aggregate together. When this option is provided,
a projection
option must also be provided.
This overload of the method expects a Iterable
that contains individual fields. This method formats the contents of
the Iterable
into a comma-delimited list.
See the AMPS User Guide for details.grouping
- the list of fields to group bypublic static java.lang.String AckConflationInterval(java.lang.String interval)
ack_conflation
interval for a logon command.
This option can be used to request that, for this connection,
the server return persisted acknowledgements for publishes more
frequently than the default 1s
interval. Notice that,
if the server replicates messages to other destinations, the
effective conflation interval may depend on the replication
configuration of this server and the replication configuration of
the destinations that this server replicates to: AMPS will not
provide a persisted acknowledgment for a message that
has not been properly acknowledged by the applicable
replication destinations.
This option is only valid on a logon
command.interval
- the interval at which to conflate persisted publish
acknowledgements for this connection