Consultor Eletrônico



Kbase 40710: How to process 1 topics message at a time?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Solution ID: P10710

GOAL:

How to process 1 topics message at a time?

FACT(s) (Environment):

SonicMQ 4.x

FIX:

How many messages are processed at a time depends on
the code the messages receiving client application uses. There are two
different possible communication methods. If you use asynchronous
communication by implementing a message listener than the onMessage
method of that implementation will process all messages until there is
no message anymore to consume for the specific topic. The only way to
slow down the consumption of messages within such a way coded
application is to let inside the onMessage method the thread sleep for a
while or to do more other stuff there as well.

The other possible communication method is synchronous. There you will
have to do an explicit receive call for each message if you want to
receive a message from the message consumer.

With SonicMQ there exists still a buffer for the message consumer for several
messages and as soon as the message consumer is created and the connection for receiving messages started the broker will start sending messages available for the client to the message consumer. That is conform with the JMS spec.
A possibility to control that buffer size is with property settings inside the broker.ini:

For example can be the property

GUAR_QUEUE_SIZE

used to control how many messages are sent ( if available ) to a durable subscriber. The properties:

GUAR_QUEUE_SIZE
OUTPUT_QUEUE_SIZE
and
WAIT_QUEUE_SIZE

are described within the SonicMQ V4 CONFIGURATION & ADMINISTRATION GUIDE (admin.pdf).