activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQCPP-315) Advisory messages do not work with multiple listeners
Date Tue, 31 Aug 2010 20:48:42 GMT

    [ https://issues.apache.org/activemq/browse/AMQCPP-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61569#action_61569
] 

Timothy Bish commented on AMQCPP-315:
-------------------------------------

Sadly no, this fix can't be used.  Class level static objects a re big no-no especially in
libraries where like AMQ-CPP and APR which have required startup and shutdown methods because
you can't assume that the class level static object won't be constructed before you main method
is called, therefore you can run into cases where the library code in that object tries to
access library resources which haven't yet been allocated by a call to 'initializeLibrary'.


I'd have to look at the CMSTemplate code to see if there was a thread safe guarantee intended
for the receive call.  In general the producers and consumers in CMS and JMS are intended
to be accessed from only one thread.  If there is a workable solution that doesn't impact
performance we can include that in the code.

> Advisory messages do not work with multiple listeners
> -----------------------------------------------------
>
>                 Key: AMQCPP-315
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-315
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>    Affects Versions: 3.2.2
>         Environment: Windows, ActiveMQ 5.3.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>         Attachments: activemq.log, AdvisoryMessageListener2.zip, IdGenerator.cpp, IdGenerator.h,
vs2005-build.zip
>
>
> We found that the advisory messages do not work as expected when there are multiple consumers
listening to the same advisory topics.
> We have three applications, AdvisoryMessageListener, MessageListener, and MessageSender.
> AdvisoryMessageListener listens to the following two topics:
> ActiveMQ.Advisory.Consumer.Topic.cpp.itemLookup
> ActiveMQ.Advisory.Producer.Topic.cpp.itemLookup
> MessageListener listens to topic: cpp.itemLookup
> MessageSender sends messages to topic: cpp.itemLookup
> If there is only one instance of AdvisoryMessageListener , then everything work fine.
We can get the advisory messages when we start/shut down MessageListener or MessageSender
. However, when we start a second instance of AdvisoryMessageListener , it seems to knock
out the existing connection of the first  AdvisoryMessageListener. The first instance can
no longer receive any advisory messages after that. 
> This problem could be related to the problem reported in jira item "AMQCPP-314 Starting
app with Com using cms destroys connection of other app. New problem with recent lib version".
However in our problem,  we do not have any COM layers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message