Global message service settings  Thread pools

Chapter 8: Message Service Tuning

Queue and topic settings

These settings affect the performance of the applications message consumers and message producers. You can configure them in the message queue and connection factories that you create in EAServer Manager. To associate message queue properties with a topic, specify the message queue name in the connection factory properties, then use the connection factory to create topics in your application.


REQUIRES_ACKNOWLEDGE

In queue properties, this setting specifies whether EAServer must redeliver messages that the consumer has not acknowledged. If set to false, messages can be lost if the client fails while the message is being delivered. A value of true guarantees delivery of persistent messages, and guarantees delivery of transient messages as long as the server does not fail or shut down (contingent on the queue settings and message time-to-live property). Setting this property to false for the connection factory yields significantly improved throughput for bulk publishing of transient messages.


REQUIRES_TRANSACTION or SUPPORTS_TRANSACTION

In queue properties, if you set REQUIRES_TRANSACTION to true, EAServer guarantees that persistent messages are delivered only once. In the connection factory properties, the REQUIRES_TRANSACTION and SUPPORTS_TRANSACTION properties determine whether EAServer processes persistent messages in the context of component- or client-initiated transactions. To improve throughput for bulk publishing, sending, or receiving transient messages, set these properties to false.


Quality of protection

In queue properties, the qop setting specifies the required level of SSL security. The default of “none” allows the use of plain IIOP. For best performance, use the default unless the application requires the additional security provided by SSL.


Tables for persistent messages

By default, all persistent messages are stored in one database table named message_queue. To specify a different table, set the table property for the message queue in EAServer Manager. You may get better performance using dedicated tables for each queue and topic. In any case, make sure the table used is indexed in the database.


Queue size

Set the queue maximum property to constrain the size of the in-memory queue. A positive number specifies how many messages can be stored in memory at once. When the number of messages exceeds the specified limit, EAServer discards messages in the order that they would have been retrieved.

A negative number or the default of 0 specifies that there is no size limit (other than that imposed by available memory) for the number of transient messages in the queue. In this case, the number of persistent messages in the queue is limited by the default.maximum setting in the MessageServiceConfig.props file—see “Other global settings”.

Tune the queue size to balance memory constraints against the possibility of lost messages. Persistent messages that are discarded from memory can be retrieved from the database. Transient messages are lost when discarded from the queue.

You can also control the memory used by queues and topics by:


Timeout settings

In queue or topic properties, the timeout setting specifies number of seconds that the message queue remains in memory when it is not being accessed by a consumer and has no registered listener. The default of 0 specifies no timeout. Any transient messages that are in memory when a timeout occurs are discarded.

If your application uses temporary queues or topics, the global session.timeout property specifies the default timeout–see “Other global settings”. If this value is not set, the default is 60 seconds. You can override the default by using a connection factory to create the temporary queue or topic, with a timeout specified in the EAServer Manager queue indicated by the connection factory’s CONFIG_QUEUE property.





Copyright © 2005. Sybase Inc. All rights reserved. Thread pools