qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Swiatek <g.swia...@teles.at>
Subject Invalid URL
Date Tue, 01 Feb 2011 17:08:45 GMT

I tried a C++ code with many hosts and got Invalid URL exception,
but the URL should be valid according to amqp.0-10.

Program output:
open connection
Invalid URL: amqp:tcp:,tcp: 

What I am making wrong here?

Thanks in advance,

#include <qpid/client/Connection.h>
#include <qpid/client/Session.h>
#include <qpid/Url.h>
#include <iostream>

using namespace qpid::client;
using qpid::Url;

using namespace std;

int main(int argc, char** argv) {

	Connection connection;

	try {

		cout << "open connection" << endl;
		Url url("amqp:tcp:,tcp:");

		cout << "new session" << endl;

		Session session = connection.newSession();

		cout << "close connection" << endl;

	} catch (const std::exception& ex) {
		cerr << ex.what() << endl;

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message