|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (QPID-2167) Attempting to query or declare(passive=true) a nonexistent exchange renders session unusableAttempting to query or declare(passive=true) a nonexistent exchange renders session unusable
-------------------------------------------------------------------------------------------- Key: QPID-2167 URL: https://issues.apache.org/jira/browse/QPID-2167 Project: Qpid Issue Type: Bug Components: C++ Client Affects Versions: 0.6 Environment: Windows Server 2008 Reporter: James Birdsall Fix For: 0.6 In a program using the C++ client, running against the C++ broker, trying to do a session.exchangeQuery or session.exchangeDeclare (with passive=true) on a nonexistent exchange throws a not-found exception. Thereafter, any other operations on the same session throw the same exception again, including trying to close the session. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscribe@... |
|
|
[jira] Commented: (QPID-2167) Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable[ https://issues.apache.org/jira/browse/QPID-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771567#action_12771567 ] Gordon Sim commented on QPID-2167: ---------------------------------- That is actually expected behaviour. The amqp spec dictates that the session is destroyed with a not-found 'exception'. The c++ client will throw the exception that destroyed the session on any subsequent call. If you want to test that a queue exists without destroying your session you can use queueQuery() or exchangeBound() (the latter is preferable where the queue may have a lot of messages due to a currently suboptimal impl of queueQuery()). > Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable > -------------------------------------------------------------------------------------------- > > Key: QPID-2167 > URL: https://issues.apache.org/jira/browse/QPID-2167 > Project: Qpid > Issue Type: Bug > Components: C++ Client > Affects Versions: 0.6 > Environment: Windows Server 2008 > Reporter: James Birdsall > Fix For: 0.6 > > > In a program using the C++ client, running against the C++ broker, trying to do a session.exchangeQuery or session.exchangeDeclare (with passive=true) on a nonexistent exchange throws a not-found exception. Thereafter, any other operations on the same session throw the same exception again, including trying to close the session. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscribe@... |
|
|
[jira] Commented: (QPID-2167) Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable[ https://issues.apache.org/jira/browse/QPID-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771726#action_12771726 ] James Birdsall commented on QPID-2167: -------------------------------------- Trying to check whether an exchange exists, actually. It looks like this is expected behavior for declare(passive=true), yes, based on page 217 of the AMQP 0-10 spec. Sorry about the false alarm there. However, exchange.query, on page 219, is not documented as raising a not-found exception -- it's not documented as raising any exceptions at all. It does have a "not-found" field in the return structure, though, and there's a getNotExists() method on the return type for session.queryExchange() in the Qpid C++ client. Am I missing something? > Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable > -------------------------------------------------------------------------------------------- > > Key: QPID-2167 > URL: https://issues.apache.org/jira/browse/QPID-2167 > Project: Qpid > Issue Type: Bug > Components: C++ Client > Affects Versions: 0.6 > Environment: Windows Server 2008 > Reporter: James Birdsall > Fix For: 0.6 > > > In a program using the C++ client, running against the C++ broker, trying to do a session.exchangeQuery or session.exchangeDeclare (with passive=true) on a nonexistent exchange throws a not-found exception. Thereafter, any other operations on the same session throw the same exception again, including trying to close the session. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscribe@... |
|
|
[jira] Commented: (QPID-2167) Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable[ https://issues.apache.org/jira/browse/QPID-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771949#action_12771949 ] Gordon Sim commented on QPID-2167: ---------------------------------- Sorry, you did say it was an exchange in the title, I didn't read it properly! I agree that exchangeQuery() should not throw an exception; it doesn't in my test. The returned type (ExchangeQueryResult) has a getNotFound() method that can be used to test whether the exchange exists or not. E.g. #include <qpid/client/Connection.h> #include <qpid/client/Session.h> #include <qpid/framing/ExchangeQueryResult.h> #include <cstdlib> #include <iostream> using namespace qpid::client; using namespace qpid::sys; using namespace qpid::framing; using std::string; int main(int argc, char** argv) { std::string name = argc>1 ? argv[1] : "amq.topic"; ConnectionSettings settings; settings.tcpNoDelay = true; if (argc>2) settings.host = argv[2]; if (argc>3) settings.port = atoi(argv[3]); Connection connection; try { connection.open(settings); Session session = connection.newSession(); ExchangeQueryResult result = session.exchangeQuery(name); if (result.getNotFound()) { std::cout << name << ": does not exist" << std::endl; } else { std::cout << name << ": is of type " << result.getType() << std::endl; } connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } > Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable > -------------------------------------------------------------------------------------------- > > Key: QPID-2167 > URL: https://issues.apache.org/jira/browse/QPID-2167 > Project: Qpid > Issue Type: Bug > Components: C++ Client > Affects Versions: 0.6 > Environment: Windows Server 2008 > Reporter: James Birdsall > Fix For: 0.6 > > > In a program using the C++ client, running against the C++ broker, trying to do a session.exchangeQuery or session.exchangeDeclare (with passive=true) on a nonexistent exchange throws a not-found exception. Thereafter, any other operations on the same session throw the same exception again, including trying to close the session. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscribe@... |
|
|
[jira] Closed: (QPID-2167) Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable[ https://issues.apache.org/jira/browse/QPID-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Birdsall closed QPID-2167. -------------------------------- Resolution: Cannot Reproduce I can't reproduce the problem with exchangeQuery anymore. I guess I must have been doing something wrong in my original code. > Attempting to query or declare(passive=true) a nonexistent exchange renders session unusable > -------------------------------------------------------------------------------------------- > > Key: QPID-2167 > URL: https://issues.apache.org/jira/browse/QPID-2167 > Project: Qpid > Issue Type: Bug > Components: C++ Client > Affects Versions: 0.6 > Environment: Windows Server 2008 > Reporter: James Birdsall > Fix For: 0.6 > > > In a program using the C++ client, running against the C++ broker, trying to do a session.exchangeQuery or session.exchangeDeclare (with passive=true) on a nonexistent exchange throws a not-found exception. Thereafter, any other operations on the same session throw the same exception again, including trying to close the session. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscribe@... |
| Free embeddable forum powered by Nabble | Forum Help |