You can set the properties directly in the topics.conf or queues.conf file or by means of the setprop topic or setprop queue command in the EMS Administrator Tool.
The failsafe property determines whether the server writes persistent messages to disk synchronously or asynchronously.
Ø When failsafe is not set, messages are written to the file on disk in asynchronous mode to obtain maximum performance. In this mode, the data may remain in system buffers for a short time before it is written to disk and it is possible that, in case of software or hardware failure, some data could be lost without the possibility of recovery
Ø In failsafe mode, all data for that queue or topic are written into external storage in synchronous mode. In synchronous mode, a write operation is not complete until the data is physically recorded on the external device
The failsafe property ensures that no messages are ever lost in case of server failure
Ø When the secure property is enabled for a destination, it instructs the server to check user permissions whenever a user attempts to perform an operation on that destination.
Ø If the secure property is not set for a destination, the server does not check permissions for that destination and any authenticated user can perform any operation on that topic or queue.
Ø Topics and queues can specify the maxbytes property in the form:
Maxbytes=value [KB|MB|GB] Ex: maxbytes=1000MB
Ø For queues, maxbytes defines the maximum size (in bytes) that the queue can store, summed over all messages in the queue. Should this limit be exceeded, messages will be rejected by the server and the message producers send calls will return an error
Ø If maxbytes is zero, or is not set, the server does not limit the memory allocation for the queue
Ø For queues, maxbytes defines the maximum size (in bytes) that the queue can store, summed over all messages in the queue. Should this limit be exceeded, messages will be rejected by the server and the message producer sends calls will return an error
Ø Where value defines the maximum number of messages that can be waiting in a queue. When adding a message would exceed this limit, the server does not accept the message into storage, and the message producer’s send call returns an error.
Ø If maxmsgs is zero, or is not set, the server does not limit the number of messages in the queue.
Ø You can set both maxmsgs and maxbytes properties on the same queue. Exceeding either limit causes the server to reject new messages until consumers reduce the the queue size to below these limits.
Topics and queues can specify the overflowPolicy property to change the effect of exceeding the message capacity established by either maxbytes or maxmsgs.
o OverflowPolicy=default | discardOld | rejectIncoming
Ø For topics, default specifies that messages are sent to subscribers, regardless of maxbytes or maxmsgs setting.
Ø For queues, default specifies that new messages are rejected by the server and an error is returned to the producer if the established maxbytes or maxmsgs value has been exceeded.
Ø For topics, discardOld specifies that, if any of the subscribers have an outstanding number of undelivered messages on the server that are over the message limit, the oldest messages are discarded before they are delivered to the subscriber.
Ø The discardOld setting impacts subscribers individually. For example, you might have three subscribers to a topic, but only one subscriber exceeds the message limit. In this case, only the oldest messages for the one subscriber are discarded, while the other two subscribers continue to receive all of their messages.
Ø For queues, discardOld specifies that, if messages on the queue have exceeded the maxbytes or maxmsgs value, the oldest messages are discarded from the queue and an error is returned to the message producer
Ø For topics, rejectIncoming specifies that, if any of the subscribers have an outstanding number of undelivered messages on the server that are over the message limit, all new messages are rejected and an error is returned to the producer.
Ø For queues, rejectIncoming specifies that, if messages on the queue have exceeded the maxbytes or maxmsgs value, all new messages are rejected and an error is returned to the producer.
Ø Messages destined for a topic or queue with the global property set are routed to the other servers that are participating in routing with this server.
You can set global using the form: global
Ø The sender_ name property specifies that the server may include the sender’s username for messages sent to this destination.
You can set sender_name using the form: sender_name
Ø The sender_name_enforced property specifies that messages sent to this destination must include the sender’s user name. The server retrieves the user name of the message producer using the same procedure described in the sender_name property above. However, unlike, the sender_name property, there is no way for message producers to override this property.
You can set sender_name_enforced using the form: sender_name_enforced
Ø If the sender_name property is also set on the destination, this property overrides the sender_name property.
Ø The flowControl property specifies the target maximum size the server can use to store pending messages for the destination. Should the number of messages exceed the maximum; the server will slow down the producers to the rate required by the message consumers. This is useful when message producers send messages much more quickly than message consumers can consume them.
If you specify the flowControl property without a value, the target maximum is set to 256KB.
Ø The flow_control parameter in tibemsd.conf file must be set to enable before the value in this property is enforced by the server. See Flow Control for more information about flow control.
Ø Specifies that tracing should be enabled for this destination.
o You can set trace using the form: trace [=body]
Ø Specifying trace (without =body), generates trace messages that include only the message sequence and message ID. Specifying trace=body generates trace messages that include the message body
Ø The import property allows messages published by an external system to be received by an EMS destination (a topic or a queue), as long as the transport to the external system is configured.
o You can set import using the form: import=”list”
Ø The export property allows messages published by a client to a topic to be exported to the external systems with configured transports.
o You can set import using the form: export=”list”
Ø It supports for only topics not queues.
Ø The maxRedelivery property specifies the number of attempts the server should make to redeliver a message sent to a queue.
o You can set maxRedelivery using the form: maxRedelivery=count
Ø Where count is an integer between 2 and 255 that specifies the maximum number of times a message can be delivered to receivers. A value of zero disables maxRedelivery, so there is no maximum.
Ø Once the server has attempted to deliver the message the specified number of times, the message is either destroyed or, if the JMS_TIBCO_PRESERVE_UNDELIVERED property on the message is set to true, the message is placed on the undelivered queue so it can be handled by a special consumer
Undelivered Message Queue
If a message expires or has exceeded the value specified by the maxRedelivery property on a queue, the server checks the message’s JMS_TIBCO_PRESERVE_UNDELIVERED property. If
JMS_TIBCO_PRESERVE_UNDELIVERED is set to true, the server moves the message to the undelivered message queue, $sys.undelivered. This undelivered message queue is a system queue that is always present and cannot be deleted. If JMS_TIBCO_PRESERVE_UNDELIVERED is set to false, the message will be deleted by the server.
Ø The exclusive property is available for queues only (not for topics).
Ø When exclusive is set for a queue, the server sends all messages on that queue to one consumer. No other consumers can receive messages from the queue. Instead, these additional consumers act in a standby role; if the primary consumer fails, the server selects one of the s tandby consumers as the new primary, and begins delivering messages to it.
Ø By default, exclusive is not set for queues and the server distributes messages in a round-robin—one to each receiver that is ready. If any receivers are still ready to accept additional messages, the server distributes another round of messages—one to each receiver that is still ready. When none of the receivers are ready to receive more messages, the server waits until a queue receiver reports that it can accept a message.
The message consumer portion of a client and the server cooperate to regulate fetching according to the prefetch property. The prefetch property applies to both topics and queues.
You can set prefetch using the form: prefetch=value
where value is one of the values in 2 0r more ,1,0,None.
Ø 2 or more: The message consumer automatically fetches messages from the
server. The message consumer never fetches more than the number of messages specified by value.
Ø 1 :-The message consumer automatically fetches messages from the server initiating fetch only when it does not currently hold amessage.
Ø None:-Disables automatic fetch. That is, the message consumer initiates fetch only when the client calls receive—either an explicit synchronous call, or an implicit call (in an asynchronous consumer).This value cannot be used with topics or global queues.
Ø 0:-The destination inherits the prefetch value from a parent
destination with a matching name. If it has no parent, or nodestination in the parent chain sets a value for prefetch, then the default value is 5 queues and 64 for topics.
Ø When a destination does not set any value (i.e prefetch value is empty)for prefetch, then the default value is 0 (zero; that is, inherit the prefetch value).
Ø If an expiration property is set for a destination, when the server delivers a message to that destination, the server overrides the JMSExpiration value set by the producer in the message header with the time specified by the expiration property.
o You can set the expiration property for any queue and any topic using the form:
Ø where time is the number of seconds. Zero is a special value that indicates messages to the destination never expire.