You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2011/02/15 18:10:57 UTC

[jira] Created: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

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
         Environment: Linux, Mono JIT compiler version 2.6.7 (tarball Mon Jul 19 18:28:58 UTC 2010)
            Reporter: Keith Wall
            Priority: Minor


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:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Marnie McCormack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998314#comment-12998314 ] 

Marnie McCormack commented on QPID-3059:
----------------------------------------

Reviewed and applied patch, having IE6 issues with hitting 'Accepted'. Will upgrade and then come back to accept this JIRA.

> 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) and
> Windows 7
>            Reporter: Keith Wall
>            Assignee: Marnie McCormack
>            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 seems 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:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Keith Wall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall updated QPID-3059:
-----------------------------

    Environment: 
Linux, Mono JIT compiler version 2.6.7 (tarball Mon Jul 19 18:28:58 UTC 2010) and
Windows 7

  was:Linux, Mono JIT compiler version 2.6.7 (tarball Mon Jul 19 18:28:58 UTC 2010)


I have reproduced the same issue natively on Windows 7 too. Behaviour is as Linux/Mono - TopicListener program exits immediately without awaiting the arrival of the message.
Also verified that the patch resolves the defect on Windows platform too.


> 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) and
> Windows 7
>            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 seems 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:dev-subscribe@qpid.apache.org


[jira] Issue Comment Edited: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Keith Wall (JIRA)" <ji...@apache.org>.
    [ 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:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Keith Wall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall updated QPID-3059:
-----------------------------

    Description: 
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 seems 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...





  was:
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..."






Correct minor typo.

> 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 seems 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:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Keith Wall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall updated QPID-3059:
-----------------------------

    Attachment: 0001-QPID-3059-Used-a-monitor-to-ensure-that-the-main-thr.patch

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:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Marnie McCormack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marnie McCormack updated QPID-3059:
-----------------------------------

    Status: Ready To Review  (was: In Progress)

> 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) and
> Windows 7
>            Reporter: Keith Wall
>            Assignee: Marnie McCormack
>            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 seems 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:dev-subscribe@qpid.apache.org


[jira] Assigned: (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Marnie McCormack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marnie McCormack reassigned QPID-3059:
--------------------------------------

    Assignee: Marnie McCormack

> 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) and
> Windows 7
>            Reporter: Keith Wall
>            Assignee: Marnie McCormack
>            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 seems 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:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3059) Example TopicListener.cs does not await the arrival of messages

Posted by "Robbie Gemmell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell resolved QPID-3059.
----------------------------------

    Resolution: Fixed

Based on the comment above I'm just hitting accept whilst passing by :)

> 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) and
> Windows 7
>            Reporter: Keith Wall
>            Assignee: Marnie McCormack
>            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 seems 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:dev-subscribe@qpid.apache.org