FioranoMQ provides the configuration parameters, below, to tune the point-to-point messaging model:
In-Memory Persistent Message Buffer
FioranoMQ server buffers the persistent messages in its in-memory cache besides storing these messages in the persistent store. This buffering is done to ensure fast delivery of messages to the listening receivers. The variable named PersistentInMemoryBufferSize depicts the size of the in-memory buffer whose default value is 512KB (512*1024). This value can be increased when the message send rate is high. This is because when the send rate is high, the buffer gets filled up faster than when the send rate of messages is lower.
The steps below enable the configuration of the In-Memory Persistent Message Buffer parameter using the Fiorano Admin Studio in online mode:
- Invoke the Fiorano Admin Studio and login to the FioranoMQ Server through JMX login.
- Select Fiorano > mq > ptp > PtPManager > QueueingSubSystem > config from the Server Explorer pane.
- In the Properties pane, type in the new value against the property named PersistentInMemoryBufferSize and press Enter.
In-Memory Non-Persistent Message Buffer
The FioranoMQ Server stores the published non-persistent messages in an in-memory table. The size of this buffer is monitored by the parameter NPInMemoryBufferSize whose default value is 1MB. This buffer can gets full if the message send rate is quite high as compared to the message receive rate. When this buffer fills up, the FioranoMQ senders cannot push new messages into the buffer and messages remain blocked till a receiver is activated on the concerned queue to empty the buffer.
It is recommended that the size of the buffer is set to a value where chances of it becoming full are minimized, particularly in cases where the senders are sending messages at a much faster rate than the rate at which they are being received.
The steps below enable the configuration of the In-Memory Non-Persistent Message Buffer parameter through Fiorano Admin Studio in online mode:
- Through the Fiorano Admin Studio login to the FioranoMQ Server usingJMX login.
- Select Fiorano > mq > ptp > PtPManager > QueueingSubSystem > config from the Server Explorer pane.
- In the Properties pane, type in the new value of the property named InMemoryBufferSize and press Enter.
Prefetch Count
Prefetch count is the number of messages requested by a client from the Server in one 'receive call'. Prefetch count can be set through the PrefetchCount parameter using Admin Studio in the offline mode. The default value of this variable is 3. PTP prefetching enables the FioranoMQ Server to deliver a maximum number of prefetch count messages to the receiver on each receive call.
Perform the steps below to configure the Prefetch Count parameter:
- Open the Fiorano Admin Studio.
- Select Tools > Configure Profile from the menu bar. Select the FioranoMQ folder, and click the Open button. FioranoMQ is now in offline mode.
- Navigate to FioranoMQ -> Fiorano -> mq -> ptp -> QueuingSubSystem in the Profile Manager pane. The properties of the PTP Manager are displayed in the Properties pane.
- Select the ellipsis against the parameter PrefetchCount. Type in the new value in the PrefetchCount dialog box and click OK.
- Right-click on the FioranoMQ domain in the Server Explorer pane and select the Save option from the shortcut menu.
Prefetch Threshold
Prefetch threshold denotes the minimum number of messages in the local buffer of the client that trigger a request for delivery of more messages to the client. Prefetch threshold can be set through a parameter named PrefetchThreshold using the Fiorano Admin Studio in the offline mode.
The default value of the Prefetch Threshold variable is 1. The number of messages that are requested from the server when the threshold limit is reached is equal to the prefetch count.
Perform the steps below to configure the Prefetch Threshold parameter:
- Open the Fiorano Admin Studio.
- Select Tools > Configure Profile from the menu bar. Select the FioranoMQ folder, and click the Open button. FioranoMQ is now in offline mode.
- Navigate to FioranoMQ -> Fiorano -> mq -> ptp -> QueuingSubSystem in the Profile Manager pane. The properties of the PTP Manager are displayed in the Properties pane.
- Select the ellipsis against the parameter PrefetchThreshold. Type in the new value in the PrefetchThreshold dialog box and click OK.
- Right-click on the FioranoMQ domain in the Profile Manager pane and select the Save option from the shortcut menu.
PTP Prefetch size
The PTP Prefetch size parameter is used to specify the total size of messages (in bytes) that will be sent by the FioranoMQ Server on each receive call made by the client. Prefetch size can be set through a parameter named MaxPrefetchSize using the Fiorano Admin Studio in the offline mode. The default value of this variable is 512 KB. If both Prefetch Size and Prefetch Count are specified,the number of messages sent by FioranoMQ server is controlled by the minimum value among these two parameters.
Perform steps below to configure the Prefetch Size parameter:
- Open Fiorano Admin Studio.
- Select Tools > Configure Profile from the menu bar. Select the FioranoMQ folder and click the Open button. FioranoMQ is now in offline mode.
- Navigate to FioranoMQ -> Fiorano -> mq -> ptp -> QueuingSubSystem in the Profile Manager pane. The properties of the PTP Manager are displayed in the Properties pane.
- Select the ellipsis against the parameter MaxPrefetchSize. Type in the new value in the MaxPrefetchSize dialog box and click OK.
- Right-click on the FioranoMQ domain in the Profile Manager pane and select the Save option from the shortcut menu.
Queue Sender Blocking Interval
This parameter represents the period, in milliseconds, for which the sender will be blocked (while it is unable to push more messages in the In-Memory Buffer maintained by the FioranoMQ Server). The parameter InMemoryBlockingInterval can be set through the Fiorano Admin Studio in online mode. The default value of this variable is 10 milliseconds. The Sender Blocking Interval parameter is used only where persistent messages are present. Setting this parameter to -1 allows a sender to continuously publish messages without blocking them.The Sender Blocking Interval is ignored if no receivers are registered on a queue.
Perform the steps below to configure the Sender Blocking Interval parameter:
- Open Fiorano Admin Studio and login to the FioranoMQ server.
- Select Destinations > Queues sub-node from the Server Explorer pane.
- Select the Queue name whose properties are to be displayed.
- In the Properties pane, type in the new value of InMemoryBlockingInterval and press Enter.