Consultor Eletrônico



Kbase P101932: Adapter for SonicMQ: JMS-MAXIMUM-MESSAGES
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/3/2005
Status: Unverified

FACT(s) (Environment):

SonicMQ
Progress 9.x
OpenEdge 10.x

SYMPTOM(s):

The maximum number of messages is 50. Call delete message IN message-handle or increase the value of the JMS-MAXIMUM-MESSAGES global INT variable.

FIX:

This error is thrown when more than 50 messages objects are created within the same session object. Depending on where the issue is occurring there are a couple of options to use against this expected behavior.
1. If the problem is occurring in a message consumer then call the session object's setReuseMessage procedure so that the consumer will not create a new message object each time a message is received. Alternatively, delete the message with the message objects's deleteMessage procedure from within the message handler, as the error suggests.
Note: If you use setReuseMessage do NOT delete the message before the session is deleted.
Because message creation can be relatively expensive using setReuseMessage improves performance.
2. If the problem is in a producing session then it is most likely because the message is being created inside of the loop which is used to produce the message to the SonicMQ broker. Either delete the message with a call to the message object's deleteMessage procedure or move the creation of the message outside the loop and just change the body and properties before each message is produced.
Because message creation can be relatively expensive reusing message objects improves performance.
3. A third option, which would most likely just prolong the issue, is to set the GLOBAL INT variable JMS-MAXIMUM-MESSAGES to a value greater than 50.