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
Hi,

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:10.220.11.35:5672,tcp:10.220.11.36:5672 
(qpid/Url.cpp:237)

What I am making wrong here?

Thanks in advance,
Grzegorz

#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:10.220.11.35:5672,tcp:10.220.11.36:5672");
		connection.open(url);

		cout << "new session" << endl;

		Session session = connection.newSession();

		cout << "close connection" << endl;

		connection.close();
	} 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


Mime
View raw message