Configure synchronous or asynchronous communication between applications by using
messaging queues and topics to send, receive, and process messages independently, improving
scalability, and reliability.
Before you begin
Ensure that a subscriber is created. For more information, see Creating subscribers.
Procedure
- From
, click the
subscriber.
The Subscriber details page is
displayed.
- Click the Subscriber settings icon in the
Subscribers page.
The Subscriber
settings dialog box is displayed.
- In the Message processing tab, do the following to configure serial
processing:
Note: Make sure that the subscriber is subscribed to a topic.
- Processing mode
- Select Serial. The Max concurrent processing value
is set to one by default for serial processing.
- Max prefetch size
- Number of messages you want the subscriber to retrieve from the Messaging Provider. The default
value is 10. If you do not want to prefetch messages from the Messaging Provider, specify zero.
- In the Message processing tab, do the following to configure
concurrent processing:
- Processing mode
- Select Concurrent. The Max concurrent processing
value is set to one by default for serial processing.
- Max concurrent processing
- Maximum number of messages that must be processed concurrently. You can specify a value between
one and 100. The value of one is the same as serial processing. For example, if this value is set to
10 and if 10 messages are received from Messaging Provider, then the subscriber processes all 10
messages at the same time based on the Max prefetch size
setting.
Note: Consider using 10 concurrent threads or less to avoid performance degradation.
- Connection Count
- Number of connections a subscriber must make to receive messages from the Messaging Provider.
You can specify a value between one to 10. The default vale is one.
Note: The
Connection count property is applicable for subscribers that are associated
with the JMS connector. Also, as part of the creation of the JMS connector account, you must set the
Allow new connection per subscriber value to True to
set the Connection count property to be applicable.
- Max prefetch size
- Number of messages you want the subscriber to retrieve from the Messaging Provider in a single
request. The default value is 10.
Specify zero if you do not want to use the prefetch messages
from the Messaging Provider.
- Click OK.
The Subscribers
page is displayed.
- Click Save.
Results
- The subscriber now processes the messages based on the configured processing mode.
- Retrieving multiple messages for a subscriber with each
request
You can retrieve multiple messages from the Messaging Provider with each request by using
the Max prefetch size property. Use of the prefetch size can improve the
performance of the subscriber because it reduces the time spent retrieving messages for the
Messaging Provider. It can also reduce the burden on the Messaging Provider as it reduces the number
of requests to which the Messaging Provider needs to respond.
Using the prefetch size is most
likely to improve performance for subscribers that process many small messages and have services
that run quickly. For subscribers that fit this use case, prefetching messages can improve the
overall performance of the application as subscriber saves time in retrieving messages one by one
from the provider every time. If a subscriber receives large messages or has long-running services,
by using the prefetch size affects the overall performance of the application.
Note: .Prefetching messages has an impact on concurrency as the prefetched messages are always
processed serially.