NonStop JMS User's Manual (H06.03+, J06.03+, NonStop JMS 3.0+)
NSJMS and JMS Client Applications
NonStop Server for Java Message Service User’s Manual—522356-006
4-8
Destination Names
Destination Names
Queue names and topic names are Java letters and Java digits, limited to 100 bytes,
where the first character is a Java letter. This syntax also describes subscription
names and client IDs.
Temporary Destinations
JMS allows for the creation of temporary queues and topics that exist only for the
duration of a JMS connection. A temporary queue or topic is a unique destination that
survives only as long as the JMS connection that created it. NSJMS creates these as
specially named destinations with these prefixes: __temp_queue__ or __temp_topic__.
When a JMS connection is closed, any temporary destinations along with associated
messages are removed. If an application ends abnormally and a close operation is
not performed, the temporary destinations and associated messages remain on the
database until the next DELETE MESSAGE EXPIRED operation is performed.
This code fragment creates a temporary queue destination:
Queue queue = session.createTemporaryQueue();
This code fragment creates a temporary topic destination:
Topic topic = session.createTemporaryTopic();
Destination IDs
Destinations (queues and topics) within NSJMS are assigned IDs that represent the
destinations in the database. The IDs allow efficient storage for messages and flexible
partitioning of the message table.
Assignment of the destination ID is done when the destination is first created. This
assignment can be automatic (implicit) or it can be explicitly provided within the
administrative commands.
Explicit destination-ID assignment is useful when you need message-table partitioning.
The IDs are chosen so that ranges are defined over the IDs to identify the partitions.
For example, you can group destinations by 100s with separate partitions assigned to
each range of 100.
Destination IDs must be positive numbers, 1 to 32767 (SHORT_MAX). If no explicit
ID is specified, the ID is generated by adding one to the current highest ID. Destination
IDs cannot be changed once assigned. You must delete and re-create a destination to
change an ID.
Persistence
NSJMS does not optimize for NON_PERSISTENT messages (deliver at most once). All
messages are treated as having PERSISTENT delivery mode (deliver once and only
once).