[
https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994885#comment-12994885
]
Keith Wall edited comment on QPID-3059 at 2/16/11 11:08 AM:
------------------------------------------------------------
Changed TopicListener example code. It now uses a monitor to either await the
arrival of the the shutdown message (from TopicPublisher), or a timeout occurs.
I puzzled how the example has ever worked. The Dispatcher thread created in
./Qpid.Client/Client/AmqChannel.cs has always had IsBackground set to true, and
http://msdn.microsoft.com/en-us/library/h339syd0%28v=vs.71%29.aspx says "a
background thread will not keep the managed execution environment alive" so
without a foreground thread, the VM will always terminate.
was (Author: k-wall):
Changed TopicListener example code. It now uses a monitor to either await
the arrival of the the shutdown message (from TopicPublisher), or a timeout
occurs.
> Example TopicListener.cs does not await the arrival of messages
> ---------------------------------------------------------------
>
> Key: QPID-3059
> URL: https://issues.apache.org/jira/browse/QPID-3059
> Project: Qpid
> Issue Type: Bug
> Components: Dot Net Client
> Affects Versions: 0.8
> Environment: Linux, Mono JIT compiler version 2.6.7 (tarball Mon Jul
> 19 18:28:58 UTC 2010)
> Reporter: Keith Wall
> Priority: Minor
> Attachments:
> 0001-QPID-3059-Used-a-monitor-to-ensure-that-the-main-thr.patch
>
>
> I'm trying to run the TopicListener/TopicPublisher provided in the source
> tree of the dotnet 0.8 client (The Java Broker Compatible client) . I'm
> running on a Linux host under Mono.
> I find when I execute TopicListener.exe it immediately writes "Waiting for
> messages..." to the console and then exits. The problem seem to me that the
> main thread is being allowed to terminate so the program is exiting before it
> has a chance to hear the messages of TopicPublisher.
> mono ./bin/mono-2.0/debug/TopicListener.exe
> Waiting for messages..."
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]