Kbase P3956: Second message not sent to second receiver when first not acknowledged yet by first receiver
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Unverified
FACT(s) (Environment):
SonicMQ
SYMPTOM(s):
Second message not sent to second receiver when first not acknowledged yet.
CAUSE:
This happens when the default settings are in use and two or more QueueReceivers are consuming messages from the same queue. To allow performance tuning, SonicMQ extends the standard QueueReceiver interface to enable programmers to set and get parameters of the message receiver. The number of messages that the receiver will take off of the queue to buffer locally for consumption and acknowledgment is called the PrefetchCount. By default the PrefetchCount is set to 3. That means that if a queue contains 3 messages, a receive call will take all three of those messages. A receive call coming later from another session will not get any messages because those messages are already consumed. If the receiver who consumed those three messages acknowledges only one of them and then ends the queue session, the other two received
messages will be put back into the queue and made available for other consumers.
FIX:
set the prefetch count to 1.
It is possible to change the
PrefetchCount with the method :
progress.message.jclient.QueueReceiver.setPrefetchCount(int count)
where count is the number of messages to prefetch.