TIBCO Enterprise Message Service introduces two types of message delivery which are extensions to the JMS specification.
JMS delivery requirements ensure delivery in almost all circumstances, even if the message receiver is off-line for some time. However, this ensured delivery has a price. This type of delivery requires:
For higher throughput, you may choose one or both of the extensions provided by TIBCO Enterprise Message Service. You might choose this especially if the content of the messages is time-dependent data, such as a stock price quotation.
TIBCO Enterprise Message Service has two extensions to the JMS specification:
JMS has PERSISTENT
and NON_PERSISTENT
delivery modes for both topic and queue. EMS extends the set of delivery modes to include reliable delivery.
With PERSISTENT
delivery, the JMS specification requires the server to return a system message to the producer client application. With RELIABLE_DELIVERY
mode, the server does not send this system message, and the producer client program does not wait for it. Reliable mode decreases the volume of message traffic, allowing better usage of system resources, and higher message rates.
You can set the delivery mode to reliable in one of two ways:
When you use the reliable delivery mode, the client application does not receive any response from the server. Therefore, all publish calls will always succeed (not throw an exception) unless the connection to the server has been terminated.
In some cases a message published in reliable mode may be disqualified and not handled by the server because the destination is not valid or access has been denied. In this case, the message is not sent to any message consumer. However, unless the connection to the server has been terminated, the publishing application will not receive any exceptions, despite the fact that no consumer received the message.
TIBCO Enterprise Message Service provides a mechanism for not acknowledging the receipt of messages.
In no-acknowledge receipt mode, after the server sends a message to the client, all information regarding that message for that consumer is eliminated from the server. Therefore, there is no need for the client application to send an acknowledgement to the server about the received message. Not sending acknowledgements decreases the message traffic and saves time for the receiver, therefore allowing better utilization of system resources.
No-acknowledgement receipt mode is configured at the session level. Add the com.tibco.tibjms.Tibjms.NO_ACKNOWLEDGE
constant when you create the session. For example:
javax.jms.TopicSession session =
topicConnection.createTopicSession( false,com.tibco.tibjms.Tibjms.NO_ACKNOWLEDGE);
TIBCO Enterprise Message Service™ User’s Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |