|
SonicMQ API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageConsumer
A client uses a MessageConsumer for receiving messages that have been delivered to a destination.
Although is possible to have two Sessions with a MessageConsumer for the same queue, JMS does not define how messages are distributed between the MessageConsumers.
MessageConsumer
Method Summary | |
---|---|
int |
getPrefetchCount()
Get the prefetch count for the QueueReceiver. |
int |
getPrefetchThreshold()
Get the prefetch threshold for the QueueReceiver. |
void |
setPrefetchCount(int count)
Set the prefetch count for the QueueReceiver. |
void |
setPrefetchThreshold(int threshold)
Set the prefetch threshold for the QueueReceiver. |
Methods inherited from interface javax.jms.MessageConsumer |
---|
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener |
Method Detail |
---|
int getPrefetchCount()
setPrefetchCount(int)
int getPrefetchThreshold()
setPrefetchThreshold(int)
void setPrefetchCount(int count) throws JMSException
Note that this is a Progress SonicMQ extention not found in the
standard QueueReceiver
interface.
count
- The number of messages to prefetch.
JMSException
- if an invalid value is set.setPrefetchThreshold(int)
,
getPrefetchCount()
void setPrefetchThreshold(int threshold) throws JMSException
Setting this to a value greater than zero allows the QueueReceiver to always have messages available for processing locally without waiting for a broker interaction. This improves performance.
For example, a threshold value of two and a prefetch count of five will cause the QueueReceiver to fetch batches of five messages from the broker whenever the number of messages locally waiting for processing drops below two.
Note that this is a Progress SonicMQ extention not found in the
standard QueueReceiver
interface.
threshold
- The threshold value for prefetching messages.
JMSException
- if an invalid value is set.setPrefetchCount(int)
,
getPrefetchThreshold()
|
SonicMQ API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |