You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by chenta <ch...@gmail.com> on 2009/02/11 12:51:50 UTC
About broker list
I construct a broker cluster and I want to use c++ client to connect it.
I have three questions:
1. How do clients join the cluster? If the client connect to one of the
broker in the cluster, does it also means that it connect to the cluster?
Can I use cluster name to join to cluster?
2. How do I specified a broker list to c++ client?
3. Do we need a broker list to make failover exchange works?
Thanks,
Chenta
--
View this message in context: http://n2.nabble.com/About-broker-list-tp2308196p2308196.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: About broker list
Posted by chenta lee <ch...@gmail.com>.
Thanks a lot!
These codes explain everything.
On Thu, Feb 12, 2009 at 12:17 AM, Adam Chase <ad...@gmail.com> wrote:
> On Wed, Feb 11, 2009 at 10:46 AM, chenta lee <ch...@gmail.com> wrote:
> > On Wed, Feb 11, 2009 at 10:56 PM, Adam Chase <ad...@gmail.com>
> wrote:
> >
> >> I have been using this.
> >>
> >> There is a version of connect that can take a set of qpid servers
> >> (urls). You actually end up connecting to one of them.
> >>
> >
> > Do you remember which version it is? I know we can specify the broker
> list
> > via amqp-url. But I really don't know how to apply it in c++ client.
>
> I am using M4.
> Url url("amqp:tcp:192.168.11.11:5672");
>
> vector<Url> urlvect;
> urlVect.push_back(url);
>
> FailoverManager fm;
> fm.connect(urlvect);
>
>
>
>
>
>
> >
> >>
> >> You need to install openais to do clustering (libraries and configure
> >> it and start aisexec on each server). When qpid is built with cpg
> >> (part of openais) qpid can take a group either in the command line or
> >> via the config file. The qpid servers broadcast state to one another
> >> via cpg/openais which uses multicast. The set of commands you issue
> >> to either server are broadcast to the other. If one goes down and
> >> then comes back up the server state is quickly resync'd. The
> >> performance is slightly less than running in a non-clustered mode, but
> >> is still quite good in my opinion. You can use a FailoverManager from
> >> the client to handle the Transport exceptions you'll get when the
> >> server you are connected to goes down.
> >>
> >
> > Can I assign a list of brokers to FailoverManager at first? Or I have to
> do
> > that in the exception handler? I found a piece code in
> FailoverManager.cpp
> > which can use a vector of broker url to reconnect to other borkers.
> >
> > Thank you.
> >
> >
> >>
> >> Adam
> >>
> >> On Wed, Feb 11, 2009 at 6:51 AM, chenta <ch...@gmail.com> wrote:
> >> >
> >> > I construct a broker cluster and I want to use c++ client to connect
> it.
> >> >
> >> > I have three questions:
> >> > 1. How do clients join the cluster? If the client connect to one of
> the
> >> > broker in the cluster, does it also means that it connect to the
> cluster?
> >> > Can I use cluster name to join to cluster?
> >> > 2. How do I specified a broker list to c++ client?
> >> > 3. Do we need a broker list to make failover exchange works?
> >> >
> >> > Thanks,
> >> > Chenta
> >> > --
> >> > View this message in context:
> >> http://n2.nabble.com/About-broker-list-tp2308196p2308196.html
> >> > Sent from the Apache Qpid users mailing list archive at Nabble.com.
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > Apache Qpid - AMQP Messaging Implementation
> >> > Project: http://qpid.apache.org
> >> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> Apache Qpid - AMQP Messaging Implementation
> >> Project: http://qpid.apache.org
> >> Use/Interact: mailto:users-subscribe@qpid.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
Re: About broker list
Posted by Adam Chase <ad...@gmail.com>.
On Wed, Feb 11, 2009 at 10:46 AM, chenta lee <ch...@gmail.com> wrote:
> On Wed, Feb 11, 2009 at 10:56 PM, Adam Chase <ad...@gmail.com> wrote:
>
>> I have been using this.
>>
>> There is a version of connect that can take a set of qpid servers
>> (urls). You actually end up connecting to one of them.
>>
>
> Do you remember which version it is? I know we can specify the broker list
> via amqp-url. But I really don't know how to apply it in c++ client.
I am using M4.
Url url("amqp:tcp:192.168.11.11:5672");
vector<Url> urlvect;
urlVect.push_back(url);
FailoverManager fm;
fm.connect(urlvect);
>
>>
>> You need to install openais to do clustering (libraries and configure
>> it and start aisexec on each server). When qpid is built with cpg
>> (part of openais) qpid can take a group either in the command line or
>> via the config file. The qpid servers broadcast state to one another
>> via cpg/openais which uses multicast. The set of commands you issue
>> to either server are broadcast to the other. If one goes down and
>> then comes back up the server state is quickly resync'd. The
>> performance is slightly less than running in a non-clustered mode, but
>> is still quite good in my opinion. You can use a FailoverManager from
>> the client to handle the Transport exceptions you'll get when the
>> server you are connected to goes down.
>>
>
> Can I assign a list of brokers to FailoverManager at first? Or I have to do
> that in the exception handler? I found a piece code in FailoverManager.cpp
> which can use a vector of broker url to reconnect to other borkers.
>
> Thank you.
>
>
>>
>> Adam
>>
>> On Wed, Feb 11, 2009 at 6:51 AM, chenta <ch...@gmail.com> wrote:
>> >
>> > I construct a broker cluster and I want to use c++ client to connect it.
>> >
>> > I have three questions:
>> > 1. How do clients join the cluster? If the client connect to one of the
>> > broker in the cluster, does it also means that it connect to the cluster?
>> > Can I use cluster name to join to cluster?
>> > 2. How do I specified a broker list to c++ client?
>> > 3. Do we need a broker list to make failover exchange works?
>> >
>> > Thanks,
>> > Chenta
>> > --
>> > View this message in context:
>> http://n2.nabble.com/About-broker-list-tp2308196p2308196.html
>> > Sent from the Apache Qpid users mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > Apache Qpid - AMQP Messaging Implementation
>> > Project: http://qpid.apache.org
>> > Use/Interact: mailto:users-subscribe@qpid.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project: http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: About python command
Posted by Ted Ross <tr...@redhat.com>.
Ted Ross wrote:
> register wrote:
>> Hi all,
>>
>> I am running Qpid C++ on Opensuse 10.2 and CentOS 5.2, then run the
>> command below
>> I have tried the command on both sides, same result
>>
>> qpidc-0.4/python> ./qpid-route -v link add
>> user/pass@192.168.20.133:5672 user/pass@localhost:5672
>> Exception in thread Thread-1:
>> Traceback (most recent call last):
>> File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
>> self.run()
>> File "/usr/lib64/python2.5/threading.py", line 440, in run
>> self.__target(*self.__args, **self.__kwargs)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/connection.py",
>> line 172, in run
>> self.delegate.received(seg)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/delegates.py",
>> line 46, in received
>> getattr(self, attr)(ch, ctl)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/delegates.py",
>> line 160, in connection_start
>> ch.connection_start_ok(client_properties=Client.PROPERTIES,
>> mechanism=self.mechanism, response=r)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/generator.py",
>> line 25, in <lambda>
>> method = lambda self, *args, **kwargs: self.invoke(inst, args,
>> kwargs)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/connection.py",
>> line 200, in invoke
>> sc.write_control(ctl)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py",
>> line 253, in write_control
>> type.encode_fields(self, ctrl)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/spec010.py",
>> line 256, in encode_fields
>> f.type.encode(codec, values[f.name])
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/spec010.py",
>> line 147, in encode
>> getattr(codec, "write_%s" % self.name)(value)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py",
>> line 162, in write_vbin32
>> self.write(b)
>> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py",
>> line 296, in write
>> self.encoded += s
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position
>> 21: ordinal not in range(128)
>>
>> Thanks
>> Stephen
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project: http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
> Stephen,
>
> Thanks for pointing this out. I'm seeing it on Fedora as well. I'll
> see if I can find what's causing the exception.
>
> -Ted
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
Stephen,
The symptom you reported was a bug in the URL handling code. It has
been fixed on the SVN trunk.
http://issues.apache.org/jira/browse/QPID-1661
Regards,
-Ted
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: About python command
Posted by Ted Ross <tr...@redhat.com>.
register wrote:
> Hi all,
>
> I am running Qpid C++ on Opensuse 10.2 and CentOS 5.2, then run the
> command below
> I have tried the command on both sides, same result
>
> qpidc-0.4/python> ./qpid-route -v link add
> user/pass@192.168.20.133:5672 user/pass@localhost:5672
> Exception in thread Thread-1:
> Traceback (most recent call last):
> File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
> self.run()
> File "/usr/lib64/python2.5/threading.py", line 440, in run
> self.__target(*self.__args, **self.__kwargs)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/connection.py",
> line 172, in run
> self.delegate.received(seg)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/delegates.py",
> line 46, in received
> getattr(self, attr)(ch, ctl)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/delegates.py",
> line 160, in connection_start
> ch.connection_start_ok(client_properties=Client.PROPERTIES,
> mechanism=self.mechanism, response=r)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/generator.py",
> line 25, in <lambda>
> method = lambda self, *args, **kwargs: self.invoke(inst, args, kwargs)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/connection.py",
> line 200, in invoke
> sc.write_control(ctl)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py",
> line 253, in write_control
> type.encode_fields(self, ctrl)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/spec010.py", line
> 256, in encode_fields
> f.type.encode(codec, values[f.name])
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/spec010.py", line
> 147, in encode
> getattr(codec, "write_%s" % self.name)(value)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py",
> line 162, in write_vbin32
> self.write(b)
> File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py",
> line 296, in write
> self.encoded += s
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position
> 21: ordinal not in range(128)
>
> Thanks
> Stephen
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
Stephen,
Thanks for pointing this out. I'm seeing it on Fedora as well. I'll
see if I can find what's causing the exception.
-Ted
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
About python command
Posted by register <re...@inode.serveftp.com>.
Hi all,
I am running Qpid C++ on Opensuse 10.2 and CentOS 5.2, then run the command
below
I have tried the command on both sides, same result
qpidc-0.4/python> ./qpid-route -v link add user/pass@192.168.20.133:5672
user/pass@localhost:5672
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
self.run()
File "/usr/lib64/python2.5/threading.py", line 440, in run
self.__target(*self.__args, **self.__kwargs)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/connection.py", line
172, in run
self.delegate.received(seg)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/delegates.py", line
46, in received
getattr(self, attr)(ch, ctl)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/delegates.py", line
160, in connection_start
ch.connection_start_ok(client_properties=Client.PROPERTIES,
mechanism=self.mechanism, response=r)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/generator.py", line
25, in <lambda>
method = lambda self, *args, **kwargs: self.invoke(inst, args, kwargs)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/connection.py", line
200, in invoke
sc.write_control(ctl)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py", line
253, in write_control
type.encode_fields(self, ctrl)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/spec010.py", line 256,
in encode_fields
f.type.encode(codec, values[f.name])
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/spec010.py", line 147,
in encode
getattr(codec, "write_%s" % self.name)(value)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py", line
162, in write_vbin32
self.write(b)
File "/media/datadisk/daemons/qpidc-0.4/python/qpid/codec010.py", line
296, in write
self.encoded += s
UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 21:
ordinal not in range(128)
Thanks
Stephen
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: About broker list
Posted by chenta lee <ch...@gmail.com>.
On Wed, Feb 11, 2009 at 10:56 PM, Adam Chase <ad...@gmail.com> wrote:
> I have been using this.
>
> There is a version of connect that can take a set of qpid servers
> (urls). You actually end up connecting to one of them.
>
Do you remember which version it is? I know we can specify the broker list
via amqp-url. But I really don't know how to apply it in c++ client.
>
> You need to install openais to do clustering (libraries and configure
> it and start aisexec on each server). When qpid is built with cpg
> (part of openais) qpid can take a group either in the command line or
> via the config file. The qpid servers broadcast state to one another
> via cpg/openais which uses multicast. The set of commands you issue
> to either server are broadcast to the other. If one goes down and
> then comes back up the server state is quickly resync'd. The
> performance is slightly less than running in a non-clustered mode, but
> is still quite good in my opinion. You can use a FailoverManager from
> the client to handle the Transport exceptions you'll get when the
> server you are connected to goes down.
>
Can I assign a list of brokers to FailoverManager at first? Or I have to do
that in the exception handler? I found a piece code in FailoverManager.cpp
which can use a vector of broker url to reconnect to other borkers.
Thank you.
>
> Adam
>
> On Wed, Feb 11, 2009 at 6:51 AM, chenta <ch...@gmail.com> wrote:
> >
> > I construct a broker cluster and I want to use c++ client to connect it.
> >
> > I have three questions:
> > 1. How do clients join the cluster? If the client connect to one of the
> > broker in the cluster, does it also means that it connect to the cluster?
> > Can I use cluster name to join to cluster?
> > 2. How do I specified a broker list to c++ client?
> > 3. Do we need a broker list to make failover exchange works?
> >
> > Thanks,
> > Chenta
> > --
> > View this message in context:
> http://n2.nabble.com/About-broker-list-tp2308196p2308196.html
> > Sent from the Apache Qpid users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project: http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
Re: About broker list
Posted by Adam Chase <ad...@gmail.com>.
I have been using this.
There is a version of connect that can take a set of qpid servers
(urls). You actually end up connecting to one of them.
You need to install openais to do clustering (libraries and configure
it and start aisexec on each server). When qpid is built with cpg
(part of openais) qpid can take a group either in the command line or
via the config file. The qpid servers broadcast state to one another
via cpg/openais which uses multicast. The set of commands you issue
to either server are broadcast to the other. If one goes down and
then comes back up the server state is quickly resync'd. The
performance is slightly less than running in a non-clustered mode, but
is still quite good in my opinion. You can use a FailoverManager from
the client to handle the Transport exceptions you'll get when the
server you are connected to goes down.
Adam
On Wed, Feb 11, 2009 at 6:51 AM, chenta <ch...@gmail.com> wrote:
>
> I construct a broker cluster and I want to use c++ client to connect it.
>
> I have three questions:
> 1. How do clients join the cluster? If the client connect to one of the
> broker in the cluster, does it also means that it connect to the cluster?
> Can I use cluster name to join to cluster?
> 2. How do I specified a broker list to c++ client?
> 3. Do we need a broker list to make failover exchange works?
>
> Thanks,
> Chenta
> --
> View this message in context: http://n2.nabble.com/About-broker-list-tp2308196p2308196.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org