Hide Forgot
Description of problem: No exception is thrown when consuming messages from empty queue with c++ client. EMPTY exception is thrown when python client is used. If you assume that the c++ client behaviour is correct, feel free to change the component to python-qpid. Version-Release number of selected component (if applicable): 100% How reproducible: python-qpid-0.10-1.el5 python-qpid-qmf-0.10-10.el5 qpid-cpp-client-0.10-9.el5 qpid-cpp-client-devel-0.10-9.el5 qpid-cpp-client-devel-docs-0.10-9.el5 qpid-cpp-client-ssl-0.10-9.el5 qpid-cpp-server-0.10-9.el5 qpid-cpp-server-cluster-0.10-9.el5 qpid-cpp-server-devel-0.10-9.el5 qpid-cpp-server-ssl-0.10-9.el5 qpid-cpp-server-store-0.10-9.el5 qpid-cpp-server-xml-0.10-9.el5 qpid-java-client-0.10-9.el5 qpid-java-common-0.10-9.el5 qpid-java-example-0.10-9.el5 qpid-qmf-0.10-10.el5 qpid-qmf-devel-0.10-10.el5 qpid-tools-0.10-6.el5 This issue is also valid on latest 0.12 packages Steps to Reproduce: 1. run the test reproducers Actual results: No exception thrown when consuming messages from empty queue with c++ client Expected results: Empty exception thrown when consuming messages from empty queue with c++ client Additional info: example test reproducer output: c++: No exception caught while consuming from empty queue python: Traceback (most recent call last): File "./empty.py", line 14, in ? m = receiver.fetch(0) File "<string>", line 6, in fetch File "/usr/lib/python2.4/site-packages/qpid/messaging/endpoints.py", line 1014, in fetch raise Empty() Empty: None
Created attachment 535968 [details] cpp test reproducer
Created attachment 535970 [details] python test reproducer
There are two versions of the Receiver::fetch() method in the C++ API. The one used here returns a boolean value to indicate whether or not there was a message (true indicates a message was fetched, false indicates there was no message to fetch). The other form of the method returns the message and throws an exception if there wasn't one to fetch.
Double checked, following change invokes the expected behaviour (empty exception is thrown): - receiver.fetch(m, timeout); + m = receiver.fetch(timeout); So this issue can be probably closed as 'NOTABUG'