I’‘m a little confused about the message interface for Chat, GroupChat, and MultiUserChat. I can call nextMessage() to retrieve messages from the queue, or I can set up a listener with addMessageListener(). If I do the latter, though, the messages will still get queued, and unless I also call nextMessage() every time a message arrives, the queue will fill up indefinitely. (Well, only until 2^16 messages, I guess, since it’‘s a PacketCollector.) Is this right? Is the idea that nextMessage() should always be used to retrieve messages, even if they’‘ve already been processed by a listener? It seems like there should be a way to cancel the default collector if I plan to use a listener instead of nextMessage(), but maybe I’'m misunderstanding the intended use cases.
Thanks,
–Doug