winking324 / pyactivemq

Automatically exported from code.google.com/p/pyactivemq
Apache License 2.0
0 stars 0 forks source link

Test durable subscription #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Complete the test of durable subscription.

Original issue reported on code.google.com by fullung@gmail.com on 1 Jun 2007 at 10:59

GoogleCodeExporter commented 9 years ago
There might be some problems with durable subscriptions in AMQCPP itself. I'm 
looking
into this.

Original comment by fullung@gmail.com on 6 Jun 2007 at 12:15

GoogleCodeExporter commented 9 years ago
There are problems with Session::unsubscribe. Reported as AMQCPP-132.

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

Original comment by fullung@gmail.com on 16 Jun 2007 at 12:19

GoogleCodeExporter commented 9 years ago
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

Original comment by de.Remed...@gmail.com on 7 May 2008 at 10:57

GoogleCodeExporter commented 9 years ago
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

Original comment by fullung@gmail.com on 7 May 2008 at 11:21

GoogleCodeExporter commented 9 years ago
thank you, i'll wait for a new build, as my attempt was failed...(

Original comment by de.Remed...@gmail.com on 8 May 2008 at 4:31

GoogleCodeExporter commented 9 years ago
Ok, I'm looking at this issue today. Stay tuned.

Original comment by fullung@gmail.com on 25 May 2008 at 9:34

GoogleCodeExporter commented 9 years ago
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-td1468047
9s2354.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.

Original comment by fullung@gmail.com on 25 May 2008 at 10:27

GoogleCodeExporter commented 9 years ago
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.

Original comment by fullung@gmail.com on 25 May 2008 at 10:45

GoogleCodeExporter commented 9 years ago
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

Original comment by fullung@gmail.com on 25 May 2008 at 10:48

GoogleCodeExporter commented 9 years ago
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

Original comment by fullung@gmail.com on 25 May 2008 at 11:01

GoogleCodeExporter commented 9 years ago
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.

Original comment by fullung@gmail.com on 26 May 2008 at 12:06

GoogleCodeExporter commented 9 years ago
I used version 5.1.0 of the ActiveMQ broker when running the tests and examples.

Original comment by fullung@gmail.com on 26 May 2008 at 12:07