Ok....But when I modify the program AsynchTopicExample.java that resides
in the swiftmq_2_1_2\samples\sun_examples directory by commenting out
the last line...
topicSession = topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
topicSubscriber = topicSession.createSubscriber(topic);
topicListener = new TextListener();
topicSubscriber.setMessageListener(topicListener);
topicConnection.start();
//exitResult = SampleUtilities.wait_for_quit();
...the publisher-thread still publishes its messages but the
subscriber-thread never recieves them? (because its finished?)
Why is this?
(The wait_for_quit() contains a while loop that reads from the keyboard
and waits for the q-key beeing pressed.)
-----Original Message-----
From: Andreas Mueller [mailto:[EMAIL PROTECTED]]
Sent: 04 September, 2001 10:02
To: [EMAIL PROTECTED]
Subject: [developers] Preventing subscribers from exiting?
The only reason why we put sometimes a wait after subscriber creation is
to guarantee that the subscriber in a multi-threaded app is in place
before a publisher sends messages. That's all.
--
Andreas Mueller, IIT GmbH, Bremen/Germany, http://www.iit.de
SwiftMQ - JMS Enterprise Messaging System, http://www.swiftmq.com
-----Original Message-----
From: "Andreas Imner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Tue, 4 Sep 2001 09:46:21 +0200
Subject: [developers] Preventing subscribers from exiting?
> Hello!
>
> In the Sun Examples delivered with SwiftMQ all the asynchronous
> examples
> use methods from preventing the subscriber from exiting before they
> recieve all messages beeing sent (either by waiting for the Q-key
> beeing
> pressed or by waiting for a certain Message).
> I have seen other examples where this type of code is not used, like
in
> the examples provided with OpenJMS.
>
> What is the difference and why is the "wait" code needed in some
cases?
>
> (I have tried to write message-subscribers for use with SwiftMQ
without
> the "wait"-code but the subscriber failed to recieve any messages)
>
> Regards / Andreas Imner
>
>
>
>
> ------------------------------------------------------
> SwiftMQ developers mailing list * http://www.swiftmq.com
> To unsubscribe from this list, send an eMail to
> [EMAIL PROTECTED] and write in the body of your message:
> UNSUBSCRIBE developers <your-email-address>
> Archive: http://www.mail-archive.com/[email protected]/
>
>
>
>
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/[email protected]/
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/[email protected]/