You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Nathan Mittler (JIRA)" <ji...@apache.org> on 2007/12/15 20:11:27 UTC

[jira] Updated: (AMQCPP-157) Interoperability issues between C++ and .NET

     [ https://issues.apache.org/activemq/browse/AMQCPP-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Mittler updated AMQCPP-157:
----------------------------------

    Attachment: amq_test_c_java.zip

Hi Robert,
I've modified the C++ consumer and producer to be platform independent (got rid of MFC stuff).  I've also created a Java consumer and producer (I'm not a C# guy).

I ran the following tests using ActiveMQ CPP v2.1.3 and ActiveMQ 5.0.0 on OS X (intel 32-bit):

1) C++->C++
2) C++->Java
3) Java->C++

All tests ran successfully, without any errors at either the broker or any clients.  In addition, a restart of the broker was never required.

Could you re-run your tests with this version of the code?  Feel free to tweak the arguments to the constructors, if changing them re-creates the problem.

Also, if you can still recreate the problem between C# and C++, could you see if you can recreate with Java and C++?  Maybe we're dealing with a platform issue (windows vs *nix)

Thanks,
Nate


> Interoperability issues between C++ and .NET
> --------------------------------------------
>
>                 Key: AMQCPP-157
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-157
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>            Reporter: Nathan Mittler
>            Assignee: Nathan Mittler
>             Fix For: 2.2
>
>         Attachments: ActiveMQ+Issue.ZIP, amq_test_c_java.zip
>
>
> Taken from http://www.nabble.com/ActiveMQ-thoughts-to14262131s2354.html#a14278412
> As promised I have created a c++ test program (TestProducerBug) that will
> create up to X producers. The class that does the work is
> (TestProducers.cpp).
> I am created a C# test program (TestConsumerBugCSharp) that will create up
> to X consumers using a MessageListener.  The class that does the work is
> (TestConsumers.cs).
> I have created a C++ test program (TestConsumerBug) that will create up to X
> consumers.  The class that does the work(TestConsumers.cpp).
> Here is some information on my setup.
> Compiler MS 2005.
> ActiveMQ
> Running ActiveMQ 5.0 Dated Dec 7th 2007.  It is running on windows 2003
> Server 64 Bit.
> Running Java 1.6.0_02 this version of Java is 64 bit. (Problem happens even
> on a 32 bit version of JAVA).
> ActiveMQ Settings
> Broker Settings (persistent="false" advisorySupport="false")
> Topic Policy
> <policyEntry topic="Test.>" producerFlowControl="true">
>            <!-- lets force old messages to be discarded for slow consumers
> -->
>            <pendingMessageLimitStrategy>
>              <constantPendingMessageLimitStrategy limit="5"/>
>            </pendingMessageLimitStrategy>
>  <messageEvictionStrategy> 
>  <oldestMessageEvictionStrategy /> 
>  </messageEvictionStrategy> 
>          </policyEntry>
> Client API's
> CPP activemq-cpp-2.1.2-src
> C# ApacheActiveMQ (Not sure the version but latest trunk).
> When running these test remember to stop and restart the broker each test as
> the test can and will cause the broker to hang.
> Tests 1 -3 will show what is happening between the CPP and C# API.
> Test 4 will show what happens to a producer when a consumer is in a break
> point in the MessageListener.
> Test 1
> To recreate the issue build and run 
> TestProducerBug
> TestConsumerBugCSharp.
> If you set the number of producers and clients to 10 you should see the
> problem happen in less then 5 min (About 2,000 messages per consumer).
> The producer will throw an exception place a breakpoint on the catch block
> in the ThreadProc.  you will see the following information.
> No valid response received for command: Begin Class = ActiveMQBytesMessage
> Begin Class = ActiveMQMessageBase
> Value of ackHandler = 00000000
> Value of redeliveryCount = 0
> Value of properties = Begin Class PrimitiveMap:
> Begin Class PrimitiveMap:
> Begin Class = Message
> Value of Message::ID_MESSAGE = 0
> Value of ProducerId is Below:
> Begin Class = ProducerId
> Value of ProducerId::ID_PRODUCERID = 123
> Value of ConnectionId = 752afa01-c256-45c2-84ad-c74b0578f199
> Value of Value = 19
> Value of SessionId = 0
> No Data for Class BaseDataStructure
> End Class = ProducerId
> Value of Destination is Below:
> Begin Class = ActiveMQTopic
> Begin Class = ActiveMQDestination
> Value of exclusive = false
> Value of ordered = false
> Value of advisory = false
> Value of orderedTarget = coordinator
> Value of physicalName = Test.20
> Value of options = Begin Class activemq::util::Properties:
> End Class activemq::util::Properties:
> No Data for Class BaseDataStructure
> End Class = ActiveMQDestination
> End Class = ActiveMQTopic
> Value of TransactionId is Below:
> Object is NULL
> Value of OriginalDestination is Below:
> Object is NULL
> Value of MessageId is Below:
> Begin Class = MessageId
> Value of MessageId::ID_MESSAGEID = 110
> Value of ProducerId is Below:
> Begin Class = ProducerId
> Value of ProducerId::ID_PRODUCERID = 123
> Value of ConnectionId = 752afa01-c256-45c2-84ad-c74b0578f199
> Value of Value = 19
> Value of SessionId = 0
> No Data for Class BaseDataStructure
> End Class = ProducerId
> Value of ProducerSequenceId = 19025
> Value of BrokerSequenceId = 0
> No Data for Class BaseDataStructure
> End Class = MessageId
> Value of OriginalTransactionId is Below:
> Object is NULL
> Value of GroupID = 
> Value of GroupSequence = 0
> Value of CorrelationId = 
> Value of Persistent = 0
> Value of Expiration = 1197392556357
> Value of Priority = 4
> Value of ReplyTo is Below:
> Object is NULL
> Value of Timestamp = 1197392551357
> Value of Type = 
> Value of Content[0] = 
> Value of Content[1] = , check broker.
> FILE: ..\src\main\activemq\transport\filters\ResponseCorrelator.cpp, LINE:
> 146
> FILE: ..\src\main\activemq\transport\filters\ResponseCorrelator.cpp, LINE:
> 154
> FILE: ..\src\main\activemq\connector\openwire\OpenWireFormatNegotiator.cpp,
> LINE: 105
> FILE: ..\src\main\activemq\connector\openwire\OpenWireConnector.cpp, LINE:
> 1371
> FILE: ..\src\main\activemq\connector\openwire\OpenWireConnector.cpp, LINE:
> 848
> FILE: ..\src\main\activemq\core\ActiveMQSession.cpp, LINE: 675
> FILE: ..\src\main\activemq\core\ActiveMQProducer.cpp, LINE: 194
> FILE: ..\src\main\activemq\core\ActiveMQProducer.cpp, LINE: 149
> FILE: ..\src\main\activemq\core\ActiveMQProducer.cpp, LINE: 108
> Test 2
> Now if you build and run
> TestProducerBug
> TestConsumerBug
> These tests both use the C++ API and works as expected
> Test 3
> In the CPP program TestProducerBug you will find a sleep commented out in
> the ThreadProc uncomment this line.  Build Program.
> Build TestConsumerCSharp.
> You will find with the 100 ms sleep the application is stable.
> Test 4
> Build TestProducerBug remember to comment out the sleep
> Build TestConsumerCSharp.
> Place a breakpoint on the MessageListner in the C# program.
> In very little time the producer will throw an exception.

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