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 Manual522356-006
4-17
Message Expiration Values
timeout value can improve performance because the SQL operation is stopped and
restarted less frequently while awaiting a message; the longer timeout does not block
the process since other threads run during the time spent waiting for the message.
Message Expiration Values
You can change the default expiration value for a message sent to a destination by
specifying a value for the expiry attribute in the ADD command. The expiry attribute
sets the default expiration value for a message to a specified number of milliseconds
(see ADD Command on page 7-2).
Queue Message Removal
The application determines the rate of removal for messages in queues, which are
deleted as they are received. Messages in queues might also have expiration
attributes that specify that the messages can be removed before they are received.
Topic Message Removal
Messages on topics are not removed by subscribers. The messages exist until they
are removed because they have expired or are dead.
A topic message is expired when the message-expiration value is exceeded. An
expiration value is specified when the message is sent. If no expiration value is
specified, the message never expires.
A topic message is dead after it has been read by all subscribers.
To remove expired and dead messages, do either of these:
Use the NSJMS administrative utility DELETE command.
Set the Deadmsg.deletecount property in the nsjms.property file to a value
greater than 0. This value represents the number of messages received between
the deletion of dead messages. For example, a delete count of 100 means that
after every 100th message received from a topic, all existing dead messages are
deleted. Setting the Deadmsg.deletecount property to 0 disables
dead-message removal.