Export to GitHub

pyactivemq - issue #7

Test durable subscription


Posted on Jun 1, 2007 by Massive Kangaroo

Complete the test of durable subscription.

Comment #1

Posted on Jun 6, 2007 by Massive Kangaroo

There might be some problems with durable subscriptions in AMQCPP itself. I'm looking into this.

Comment #2

Posted on Jun 16, 2007 by Massive Kangaroo

There are problems with Session::unsubscribe. Reported as AMQCPP-132.

Meanwhile, src/examples/DurableSubscriberExample.py is a good starting point for testing durable subscription.

Comment #3

Posted on May 7, 2008 by Happy Horse

sorry, i just try DurableSubscriberExample.py example and i consider it doesn's work properly: ---the first problem is the following string: "if isinstance(message, pyactivemq.TextMessage):" This check always returns true and that's why the following error occurs: "Fatal Python error: Invalid Message type encountered in MessageListener" ---then, it seems to me, that "self.session.unsubscribe("MakeItLast")" doesn't work correctly. I have changed the previous "IF" check and then I recieved the following error: self.session.unsubscribe("MakeItLast") UserWarning: response from futureResponse was invalid

Do you know how to correct these errors?

I use pyactivemq 0.0.3pre1 Win32 release (based on ActiveMQ C++ 2.1-SNAPSHOT trunk revision 547225

Comment #4

Posted on May 7, 2008 by Massive Kangaroo

Hello,

Looks like you might have run into a bug in the version of AMQCPP I used to build pyactivemq 0.0.3pre1.

I'll try to make a new build of pyactivemq next week, or you could build it on your own (admittedly a very hard process, since you'll probably need to hack on the AMQCPP build).

Cheers,

Albert

Comment #5

Posted on May 8, 2008 by Happy Horse

thank you, i'll wait for a new build, as my attempt was failed...(

Comment #6

Posted on May 25, 2008 by Massive Kangaroo

Ok, I'm looking at this issue today. Stay tuned.

Comment #7

Posted on May 25, 2008 by Massive Kangaroo

There are some problems with building the latest AMQCPP using Visual Studio .NET 2003:

http://www.nabble.com/Unable-to-comile-C%2B%2B-client-on-VC%2B%2B-2003-td14680479s2354.html

The problem is related to covariant return types. AFAIK, VS2003 is supposed to support this, but maybe AMQCPP is just a bit too complex. I can't see anything obviously wrong with the AMQCPP code.

I'm going to try to get a decent workaround for the problem. If this doesn't work, I'll just hack the source as described in the thread above.

This situation should improve in September with the release of Python 2.6, which uses Visual Studio 2008 as its compiler.

Comment #8

Posted on May 25, 2008 by Massive Kangaroo

The idea I get from some comments on this page:

http://www.codeproject.com/KB/cpp/ismart.aspx

is that VS2003 doesn't support virtual base classes as covariant return types.

Comment #9

Posted on May 25, 2008 by Massive Kangaroo

Further indications of problems with covariant return types of virtual functions when virtual base classes are involved can be found here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=23760&SiteID=1

Comment #10

Posted on May 25, 2008 by Massive Kangaroo

I've created an issue in the AMQCPP JIRA to see if they can help me come up with a graceful workaround.

https://issues.apache.org/activemq/browse/AMQCPP-176

Comment #11

Posted on May 26, 2008 by Massive Kangaroo

In the mean time, please test the following file:

http://pyactivemq.googlecode.com/files/pyactivemq-snapshot.win32-py2.5.zip

Extract pyactivemq.pyd and drop it in your C:\Python25\Lib\site-packages directory.

You might need to install the VC++ 2005 runtime DLLs for this to work:

http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en

Using this build of pyactivemq, all the tests and examples in SVN trunk seem to work.

I used Visual Studio 2005 to build this version.

Comment #12

Posted on May 26, 2008 by Massive Kangaroo

I used version 5.1.0 of the ActiveMQ broker when running the tests and examples.

Status: Accepted

Labels:
Type-Enhancement Priority-Medium