You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Paul O'Fallon <pa...@ofallonfamily.com> on 2013/01/15 23:13:32 UTC

Activating amqp 1.0 / proton in C++ messaging example

Hello.  I've had proton installed for a while, coding directly against it's
C API (connecting to Azure ServiceBus).  Now I want to connect via c++
through Qpid itself.  I've built Qpid 0.20-rc4 and the build output
indicates that it *does* find the proton libraries and that amqp 1.0
support is enabled.

When I run the "client" c++ example (in cpp/examples/messaging) without
specifying a protocol option, I get "error Caught exception in state: 3
with event: 1: Unsupported version: 1-0 supported version 0-10" (i.e. it's
trying amqp 0.10 and not 1.0).  However, when I add the connection option
"protocol: amqp1.0" I get an error stating that this is an "Unsupported
protocol".

Is there a different connection option I need to use to trigger the use of
the proton library / amqp 1.0?

Thanks!

- Paul

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 02/05/2013 06:42 PM, Gordon Sim wrote:
> On 02/05/2013 01:36 AM, Paul O'Fallon wrote:
>> Hello.  I wanted to follow up and mention that I tried this again by
>> building qpid from the trunk (via cmake) and I still get the same error
>> ("Unsupported protocol").  Is there something else I need to do beyond
>> installing proton (which it says it found) and setting the load module
>> environment variable?
>
> There appears to be a further problem with the examples, I'm afraid. I
> haven't worked out exactly why. If you add a dummy connection variable
> at the start of main then the 1.0 support is registered correctly. (e.g.
> see attached patch).
>
> The test programs also work, e.g. src/tests/qpid-send or
> src/tests/qpid-receive.
>
> I'll dig around a bit more to find a proper fix.

This is now fixed on trunk.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 02/05/2013 01:36 AM, Paul O'Fallon wrote:
> Hello.  I wanted to follow up and mention that I tried this again by
> building qpid from the trunk (via cmake) and I still get the same error
> ("Unsupported protocol").  Is there something else I need to do beyond
> installing proton (which it says it found) and setting the load module
> environment variable?

There appears to be a further problem with the examples, I'm afraid. I 
haven't worked out exactly why. If you add a dummy connection variable 
at the start of main then the 1.0 support is registered correctly. (e.g. 
see attached patch).

The test programs also work, e.g. src/tests/qpid-send or 
src/tests/qpid-receive.

I'll dig around a bit more to find a proper fix. I suspect it must be 
some sort of static initialisation ordering issue.


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
Hello.  I wanted to follow up and mention that I tried this again by
building qpid from the trunk (via cmake) and I still get the same error
("Unsupported protocol").  Is there something else I need to do beyond
installing proton (which it says it found) and setting the load module
environment variable?

Thanks,
Paul

On Mon, Jan 21, 2013 at 1:50 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/21/2013 02:30 PM, Paul O'Fallon wrote:
>
>> Ok, thanks for the update -- I appreciate it!
>>
>
> Fixed on trunk (just by applying the aforementioned patch). I do apologise
> for not catching that prior to the 0.20 release (I was away during a large
> chunk of the later release period, but really have no excuse to offer :-( )
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 01/21/2013 02:30 PM, Paul O'Fallon wrote:
> Ok, thanks for the update -- I appreciate it!

Fixed on trunk (just by applying the aforementioned patch). I do 
apologise for not catching that prior to the 0.20 release (I was away 
during a large chunk of the later release period, but really have no 
excuse to offer :-( )


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
Ok, thanks for the update -- I appreciate it!


On Mon, Jan 21, 2013 at 8:54 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/18/2013 07:21 PM, Paul O'Fallon wrote:
>
>> Sure, see the log data below.  For context, I'm trying to write node.js
>> bindings to qpid.  Specifically, I'm after amqp1.0 support, which is why I
>> started with proton directly (and its Messenger API).  However, if I can
>> bind to qpid::messaging and provide basic support for multiple versions of
>> amqp (inc. 1.0) then that's even better.  (However, given your earlier
>> e-mail, there are likely subtle differences between proton's Messenger and
>> qpid::messaging that I'm not yet aware of.)
>>
>> Here's the log data:
>> ~/qpid-0.20/cpp/examples/**messaging$ export QPID_LOG_ENABLE=trace+
>> ~/qpid-0.20/cpp/examples/**messaging$ export
>> QPID_LOAD_MODULE=/home/paul/**qpid-0.20/cpp/src/amqpc.so
>> ~/qpid-0.20/cpp/examples/**messaging$ ./client
>> myendpoint.servicebus.windows.**net<http://myendpoint.servicebus.windows.net>'{username: owner, password: mypass,
>> protocol:amqp1.0}'
>> 2013-01-18 14:05:12 [System] debug Exception constructed: Unsupported
>> protocol: amqp1.0
>> terminate called after throwing an instance of 'qpid::Exception'
>>    what():  Unsupported protocol: amqp1.0
>> Aborted (core dumped)
>>
>
> Unfortunately this appears to be an issue with the cmake build on 0.20.
> Certain internal symbols which were hidden in
> http://svn.apache.org/viewvc?**view=revision&revision=1406353<http://svn.apache.org/viewvc?view=revision&revision=1406353>are needed by the AMQP 1.0 module.
>
> Options are to either use the autoconf build (i.e. configure instead of
> cmake), or to apply the patch attached to https://issues.apache.org/**
> jira/browse/QPID-4545 <https://issues.apache.org/jira/browse/QPID-4545>.
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 01/18/2013 07:21 PM, Paul O'Fallon wrote:
> Sure, see the log data below.  For context, I'm trying to write node.js
> bindings to qpid.  Specifically, I'm after amqp1.0 support, which is why I
> started with proton directly (and its Messenger API).  However, if I can
> bind to qpid::messaging and provide basic support for multiple versions of
> amqp (inc. 1.0) then that's even better.  (However, given your earlier
> e-mail, there are likely subtle differences between proton's Messenger and
> qpid::messaging that I'm not yet aware of.)
>
> Here's the log data:
> ~/qpid-0.20/cpp/examples/messaging$ export QPID_LOG_ENABLE=trace+
> ~/qpid-0.20/cpp/examples/messaging$ export
> QPID_LOAD_MODULE=/home/paul/qpid-0.20/cpp/src/amqpc.so
> ~/qpid-0.20/cpp/examples/messaging$ ./client
> myendpoint.servicebus.windows.net '{username: owner, password: mypass,
> protocol:amqp1.0}'
> 2013-01-18 14:05:12 [System] debug Exception constructed: Unsupported
> protocol: amqp1.0
> terminate called after throwing an instance of 'qpid::Exception'
>    what():  Unsupported protocol: amqp1.0
> Aborted (core dumped)

Unfortunately this appears to be an issue with the cmake build on 0.20. 
Certain internal symbols which were hidden in 
http://svn.apache.org/viewvc?view=revision&revision=1406353 are needed 
by the AMQP 1.0 module.

Options are to either use the autoconf build (i.e. configure instead of 
cmake), or to apply the patch attached to 
https://issues.apache.org/jira/browse/QPID-4545.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
Sure, see the log data below.  For context, I'm trying to write node.js
bindings to qpid.  Specifically, I'm after amqp1.0 support, which is why I
started with proton directly (and its Messenger API).  However, if I can
bind to qpid::messaging and provide basic support for multiple versions of
amqp (inc. 1.0) then that's even better.  (However, given your earlier
e-mail, there are likely subtle differences between proton's Messenger and
qpid::messaging that I'm not yet aware of.)

Here's the log data:
~/qpid-0.20/cpp/examples/messaging$ export QPID_LOG_ENABLE=trace+
~/qpid-0.20/cpp/examples/messaging$ export
QPID_LOAD_MODULE=/home/paul/qpid-0.20/cpp/src/amqpc.so
~/qpid-0.20/cpp/examples/messaging$ ./client
myendpoint.servicebus.windows.net '{username: owner, password: mypass,
protocol:amqp1.0}'
2013-01-18 14:05:12 [System] debug Exception constructed: Unsupported
protocol: amqp1.0
terminate called after throwing an instance of 'qpid::Exception'
  what():  Unsupported protocol: amqp1.0
Aborted (core dumped)

Thanks for your help!

- Paul


On Fri, Jan 18, 2013 at 4:05 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/17/2013 10:34 PM, Paul O'Fallon wrote:
>
>> If it helps, here's the debug log output for both scenarios (not
>> supplying,
>> and then supplying, the protocol connection option):
>>
>
> Not supplying it will always result in the default - i.e. 0-10 - being
> used. The error when supplying it is due to the module not being properly
> loaded, i.e. due to QPID_LOAD_MODULE not being set. Could you send a log
> with QPID_LOG_ENABLE=trace+, where QPID_LOAD_MODULE is set and the protocol
> option is also specified?
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 01/17/2013 10:34 PM, Paul O'Fallon wrote:
> If it helps, here's the debug log output for both scenarios (not supplying,
> and then supplying, the protocol connection option):

Not supplying it will always result in the default - i.e. 0-10 - being 
used. The error when supplying it is due to the module not being 
properly loaded, i.e. due to QPID_LOAD_MODULE not being set. Could you 
send a log with QPID_LOG_ENABLE=trace+, where QPID_LOAD_MODULE is set 
and the protocol option is also specified?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
If it helps, here's the debug log output for both scenarios (not supplying,
and then supplying, the protocol connection option):

~/qpid-0.20/cpp/examples/messaging$ ./client
myendpoint.servicebus.windows.net '{username: owner, password: mypass}'
2013-01-17 16:56:39 [Client] debug Created connection
myendpoint.servicebus.windows.net with {password:mypass, username:owner}
2013-01-17 16:56:39 [Client] debug Starting connection, urls=[
myendpoint.servicebus.windows.net]
2013-01-17 16:56:39 [Client] info Trying to connect to
myendpoint.servicebus.windows.net...
2013-01-17 16:56:39 [Client] debug Created IO thread: 0
2013-01-17 16:56:39 [Network] debug TCPConnector created for 0-10
2013-01-17 16:56:45 [System] info Connecting: x.x.x.x:5672
2013-01-17 16:56:45 [Network] debug RECV
[[y.y.y.y:57464-myendpoint.servicebus.windows.net:5672]]: INIT(1-0)
2013-01-17 16:56:45 [System] debug Exception constructed: Unsupported
version: 1-0 supported version 0-10
(~/qpid-0.20/cpp/src/qpid/client/TCPConnector.cpp:294)
2013-01-17 16:56:45 [System] error Caught exception in state: 3 with event:
1: Unsupported version: 1-0 supported version 0-10
(~/qpid-0.20/cpp/src/qpid/client/TCPConnector.cpp:294)
2013-01-17 16:56:45 [Client] warning Connection [y.y.y.y:
57464-myendpoint.servicebus.windows.net:5672] closed
2013-01-17 16:56:45 [System] debug Exception constructed: Connection
[x.x.x.x:57464-myendpoint.servicebus.windows.net:5672] closed
2013-01-17 16:56:45 [Client] info Failed to connect to
myendpoint.servicebus.windows.net: Connection [x.x.x.x:
57464-myendpoint.servicebus.windows.net:5672] closed
Failed to connect (reconnect disabled)

~/qpid-0.20/cpp/examples/messaging$ ./client
myendpoint.servicebus.windows.net '{username: owner, password: mypass,
protocol:amqp1.0}'
2013-01-17 16:56:51 [System] debug Exception constructed: Unsupported
protocol: amqp1.0
terminate called after throwing an instance of 'qpid::Exception'
  what():  Unsupported protocol: amqp1.0
Aborted (core dumped)

Thanks,
Paul



On Thu, Jan 17, 2013 at 4:47 PM, Paul O'Fallon <pa...@ofallonfamily.com>wrote:

> I have proton installed in the standard / default location (/usr/lib).
>  I'm using proton 0.3 RC3 and qpid 0.2 RC4.
>
> Thanks,
> Paul
>
>
> On Thu, Jan 17, 2013 at 1:40 PM, Gordon Sim <gs...@redhat.com> wrote:
>
>> On 01/17/2013 05:22 PM, Paul O'Fallon wrote:
>>
>>> I only have one amqpc.so in my qpid installation, so I set
>>> QPID_LOAD_MODULE
>>> to the full path of this file.  When specifying "protocol: amqp1.0" I get
>>> the same error as before.  When leaving off the "protocol" connection
>>> option, I do not get the "unsupported version" exception, but instead get
>>> an "undefined symbol: pn_link_free" error.
>>>
>>
>> Is the proton library on your load path? If its not in the standard
>> install location then you'll need to set LD_LIBRARY_PATH. What version of
>> proton do you have?
>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
>> For additional commands, e-mail: users-help@qpid.apache.org
>>
>>
>

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
I have proton installed in the standard / default location (/usr/lib).  I'm
using proton 0.3 RC3 and qpid 0.2 RC4.

Thanks,
Paul


On Thu, Jan 17, 2013 at 1:40 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/17/2013 05:22 PM, Paul O'Fallon wrote:
>
>> I only have one amqpc.so in my qpid installation, so I set
>> QPID_LOAD_MODULE
>> to the full path of this file.  When specifying "protocol: amqp1.0" I get
>> the same error as before.  When leaving off the "protocol" connection
>> option, I do not get the "unsupported version" exception, but instead get
>> an "undefined symbol: pn_link_free" error.
>>
>
> Is the proton library on your load path? If its not in the standard
> install location then you'll need to set LD_LIBRARY_PATH. What version of
> proton do you have?
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 01/17/2013 05:22 PM, Paul O'Fallon wrote:
> I only have one amqpc.so in my qpid installation, so I set QPID_LOAD_MODULE
> to the full path of this file.  When specifying "protocol: amqp1.0" I get
> the same error as before.  When leaving off the "protocol" connection
> option, I do not get the "unsupported version" exception, but instead get
> an "undefined symbol: pn_link_free" error.

Is the proton library on your load path? If its not in the standard 
install location then you'll need to set LD_LIBRARY_PATH. What version 
of proton do you have?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
I only have one amqpc.so in my qpid installation, so I set QPID_LOAD_MODULE
to the full path of this file.  When specifying "protocol: amqp1.0" I get
the same error as before.  When leaving off the "protocol" connection
option, I do not get the "unsupported version" exception, but instead get
an "undefined symbol: pn_link_free" error.

- Paul


On Thu, Jan 17, 2013 at 5:41 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/16/2013 05:58 PM, Paul O'Fallon wrote:
>
>> Ken, I tried setting that environment variable to point to my proton
>> library (/usr/lib/libqpid-proton.so) but still get the same errors (both
>> with and without specifying the protocol on the command line).
>>
>
> It is the amqpc.so library you want to load - i.e. the implementation of
> qpid::messaging that speaks 1.0 (and uses proton to do so) - not the proton
> library itself.
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Gordon Sim <gs...@redhat.com>.
On 01/16/2013 05:58 PM, Paul O'Fallon wrote:
> Ken, I tried setting that environment variable to point to my proton
> library (/usr/lib/libqpid-proton.so) but still get the same errors (both
> with and without specifying the protocol on the command line).

It is the amqpc.so library you want to load - i.e. the implementation of 
qpid::messaging that speaks 1.0 (and uses proton to do so) - not the 
proton library itself.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
Thanks for the replies!

Steve, I agree with you that the error message is ambiguous.  I checked
cpp/src/qpid/client/TCPConnector.cpp and it looks like the first version
mentioned in the error message (1-0) is the one returned by the server and
the second (0-10) is the one being attempted by the client.  This matches
my own experience, since I can connect and send/receive messages via proton
directly.

Ken, I tried setting that environment variable to point to my proton
library (/usr/lib/libqpid-proton.so) but still get the same errors (both
with and without specifying the protocol on the command line).

- Paul


On Wed, Jan 16, 2013 at 10:07 AM, Steve Huston <sh...@riverace.com> wrote:

> Hmmm... re-reading the error message seems to imply that your client is
> speaking 1-0 and Azure only knows 0-10. Could that be?
>
> > -----Original Message-----
> > From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> > Sent: Tuesday, January 15, 2013 6:48 PM
> > To: users@qpid.apache.org
> > Subject: Re: Activating amqp 1.0 / proton in C++ messaging example
> >
> > Thanks for the reply!  I have not run the broker -- I'm trying to use the
> > example command line client to connect to Azure Service Bus (via amqp
> 1.0).
> >  When I run this command:
> >
> > ~/qpid-0.20/cpp/examples/messaging$ ./client
> > myendpoint.servicebus.windows.net '{username: owner, password:
> > mypass}'
> >
> > I get this error response:
> >
> > [System] error Caught exception in state: 3 with event: 1: Unsupported
> > version: 1-0 supported version 0-10
> >
> > From reading this prior list e-mail (http://bit.ly/TZ6HQM) I assumed I
> needed
> > to add a "protocol" element to my connection options, so I tried
> > this:
> >
> > ~/qpid-0.20/cpp/examples/messaging$ ./client
> > myendpoint.servicebus.windows.net '{username: owner, password:
> > mypass,
> > protocol: amqp1.0}'
> >
> > which gives this error response
> >
> > terminate called after throwing an instance of 'qpid::Exception'
> >   what():  Unsupported protocol: amqp1.0
> >
> > To your point, I assumed that this extra connection option is what would
> > trigger the loading of the proton module.  I've connected to this
> endpoint via
> > the proton C library directly, so I know it works, but I don't know how
> to tell
> > the C++ Qpid library to use proton in this example.
> >
> > Thanks again,
> > Paul
> >
> >
> > On Tue, Jan 15, 2013 at 5:26 PM, Steve Huston <sh...@riverace.com>
> > wrote:
> >
> > > Hi Paul,
> > >
> > > When you built Qpid 0.20-rc4 and started the broker  (I assume that's
> > > the broker you ran; let me know if this is not true) did you load the
> > > proton module explicitly? Although the build system found it and built
> > > it, my understanding is that it's built as a loadable module, not
> > > built into the broker proper.
> > >
> > > -Steve
> > >
> > > > -----Original Message-----
> > > > From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> > > > Sent: Tuesday, January 15, 2013 5:14 PM
> > > > To: users@qpid.apache.org
> > > > Subject: Activating amqp 1.0 / proton in C++ messaging example
> > > >
> > > > Hello.  I've had proton installed for a while, coding directly
> > > > against
> > > it's C API
> > > > (connecting to Azure ServiceBus).  Now I want to connect via c++
> > > > through Qpid itself.  I've built Qpid 0.20-rc4 and the build output
> > > > indicates
> > > that it
> > > > *does* find the proton libraries and that amqp 1.0 support is
> enabled.
> > > >
> > > > When I run the "client" c++ example (in cpp/examples/messaging)
> > > > without specifying a protocol option, I get "error Caught exception
> > > > in state: 3
> > > with
> > > > event: 1: Unsupported version: 1-0 supported version 0-10" (i.e.
> > > > it's
> > > trying
> > > > amqp 0.10 and not 1.0).  However, when I add the connection option
> > > > "protocol: amqp1.0" I get an error stating that this is an
> > > > "Unsupported protocol".
> > > >
> > > > Is there a different connection option I need to use to trigger the
> > > > use
> > > of the
> > > > proton library / amqp 1.0?
> > > >
> > > > Thanks!
> > > >
> > > > - Paul
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For
> > > additional commands, e-mail: users-help@qpid.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

RE: Activating amqp 1.0 / proton in C++ messaging example

Posted by Steve Huston <sh...@riverace.com>.
Hmmm... re-reading the error message seems to imply that your client is speaking 1-0 and Azure only knows 0-10. Could that be?

> -----Original Message-----
> From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> Sent: Tuesday, January 15, 2013 6:48 PM
> To: users@qpid.apache.org
> Subject: Re: Activating amqp 1.0 / proton in C++ messaging example
> 
> Thanks for the reply!  I have not run the broker -- I'm trying to use the
> example command line client to connect to Azure Service Bus (via amqp 1.0).
>  When I run this command:
> 
> ~/qpid-0.20/cpp/examples/messaging$ ./client
> myendpoint.servicebus.windows.net '{username: owner, password:
> mypass}'
> 
> I get this error response:
> 
> [System] error Caught exception in state: 3 with event: 1: Unsupported
> version: 1-0 supported version 0-10
> 
> From reading this prior list e-mail (http://bit.ly/TZ6HQM) I assumed I needed
> to add a "protocol" element to my connection options, so I tried
> this:
> 
> ~/qpid-0.20/cpp/examples/messaging$ ./client
> myendpoint.servicebus.windows.net '{username: owner, password:
> mypass,
> protocol: amqp1.0}'
> 
> which gives this error response
> 
> terminate called after throwing an instance of 'qpid::Exception'
>   what():  Unsupported protocol: amqp1.0
> 
> To your point, I assumed that this extra connection option is what would
> trigger the loading of the proton module.  I've connected to this endpoint via
> the proton C library directly, so I know it works, but I don't know how to tell
> the C++ Qpid library to use proton in this example.
> 
> Thanks again,
> Paul
> 
> 
> On Tue, Jan 15, 2013 at 5:26 PM, Steve Huston <sh...@riverace.com>
> wrote:
> 
> > Hi Paul,
> >
> > When you built Qpid 0.20-rc4 and started the broker  (I assume that's
> > the broker you ran; let me know if this is not true) did you load the
> > proton module explicitly? Although the build system found it and built
> > it, my understanding is that it's built as a loadable module, not
> > built into the broker proper.
> >
> > -Steve
> >
> > > -----Original Message-----
> > > From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> > > Sent: Tuesday, January 15, 2013 5:14 PM
> > > To: users@qpid.apache.org
> > > Subject: Activating amqp 1.0 / proton in C++ messaging example
> > >
> > > Hello.  I've had proton installed for a while, coding directly
> > > against
> > it's C API
> > > (connecting to Azure ServiceBus).  Now I want to connect via c++
> > > through Qpid itself.  I've built Qpid 0.20-rc4 and the build output
> > > indicates
> > that it
> > > *does* find the proton libraries and that amqp 1.0 support is enabled.
> > >
> > > When I run the "client" c++ example (in cpp/examples/messaging)
> > > without specifying a protocol option, I get "error Caught exception
> > > in state: 3
> > with
> > > event: 1: Unsupported version: 1-0 supported version 0-10" (i.e.
> > > it's
> > trying
> > > amqp 0.10 and not 1.0).  However, when I add the connection option
> > > "protocol: amqp1.0" I get an error stating that this is an
> > > "Unsupported protocol".
> > >
> > > Is there a different connection option I need to use to trigger the
> > > use
> > of the
> > > proton library / amqp 1.0?
> > >
> > > Thanks!
> > >
> > > - Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For
> > additional commands, e-mail: users-help@qpid.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Ken Giusti <kg...@redhat.com>.
Hi Paul,

If I recall correctly, the environment variable "QPID_LOAD_MODULE" can be set to the path to the .so file you want the client to load.  Ex:  export QPID_LOAD_MODULE=/path/to/your/amqpc.so

then run the client.  At least this is how I've loaded the ssl connector plugins in the past.


-K

----- Original Message -----
> Thanks for the reply!  I have not run the broker -- I'm trying to use
> the
> example command line client to connect to Azure Service Bus (via amqp
> 1.0).
>  When I run this command:
> 
> ~/qpid-0.20/cpp/examples/messaging$ ./client
> myendpoint.servicebus.windows.net '{username: owner, password:
> mypass}'
> 
> I get this error response:
> 
> [System] error Caught exception in state: 3 with event: 1:
> Unsupported
> version: 1-0 supported version 0-10
> 
> From reading this prior list e-mail (http://bit.ly/TZ6HQM) I assumed
> I
> needed to add a "protocol" element to my connection options, so I
> tried
> this:
> 
> ~/qpid-0.20/cpp/examples/messaging$ ./client
> myendpoint.servicebus.windows.net '{username: owner, password:
> mypass,
> protocol: amqp1.0}'
> 
> which gives this error response
> 
> terminate called after throwing an instance of 'qpid::Exception'
>   what():  Unsupported protocol: amqp1.0
> 
> To your point, I assumed that this extra connection option is what
> would
> trigger the loading of the proton module.  I've connected to this
> endpoint
> via the proton C library directly, so I know it works, but I don't
> know how
> to tell the C++ Qpid library to use proton in this example.
> 
> Thanks again,
> Paul
> 
> 
> On Tue, Jan 15, 2013 at 5:26 PM, Steve Huston <sh...@riverace.com>
> wrote:
> 
> > Hi Paul,
> >
> > When you built Qpid 0.20-rc4 and started the broker  (I assume
> > that's the
> > broker you ran; let me know if this is not true) did you load the
> > proton
> > module explicitly? Although the build system found it and built it,
> > my
> > understanding is that it's built as a loadable module, not built
> > into the
> > broker proper.
> >
> > -Steve
> >
> > > -----Original Message-----
> > > From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> > > Sent: Tuesday, January 15, 2013 5:14 PM
> > > To: users@qpid.apache.org
> > > Subject: Activating amqp 1.0 / proton in C++ messaging example
> > >
> > > Hello.  I've had proton installed for a while, coding directly
> > > against
> > it's C API
> > > (connecting to Azure ServiceBus).  Now I want to connect via c++
> > > through
> > > Qpid itself.  I've built Qpid 0.20-rc4 and the build output
> > > indicates
> > that it
> > > *does* find the proton libraries and that amqp 1.0 support is
> > > enabled.
> > >
> > > When I run the "client" c++ example (in cpp/examples/messaging)
> > > without
> > > specifying a protocol option, I get "error Caught exception in
> > > state: 3
> > with
> > > event: 1: Unsupported version: 1-0 supported version 0-10" (i.e.
> > > it's
> > trying
> > > amqp 0.10 and not 1.0).  However, when I add the connection
> > > option
> > > "protocol: amqp1.0" I get an error stating that this is an
> > > "Unsupported
> > > protocol".
> > >
> > > Is there a different connection option I need to use to trigger
> > > the use
> > of the
> > > proton library / amqp 1.0?
> > >
> > > Thanks!
> > >
> > > - Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > For additional commands, e-mail: users-help@qpid.apache.org
> >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Activating amqp 1.0 / proton in C++ messaging example

Posted by Paul O'Fallon <pa...@ofallonfamily.com>.
Thanks for the reply!  I have not run the broker -- I'm trying to use the
example command line client to connect to Azure Service Bus (via amqp 1.0).
 When I run this command:

~/qpid-0.20/cpp/examples/messaging$ ./client
myendpoint.servicebus.windows.net '{username: owner, password: mypass}'

I get this error response:

[System] error Caught exception in state: 3 with event: 1: Unsupported
version: 1-0 supported version 0-10

>From reading this prior list e-mail (http://bit.ly/TZ6HQM) I assumed I
needed to add a "protocol" element to my connection options, so I tried
this:

~/qpid-0.20/cpp/examples/messaging$ ./client
myendpoint.servicebus.windows.net '{username: owner, password: mypass,
protocol: amqp1.0}'

which gives this error response

terminate called after throwing an instance of 'qpid::Exception'
  what():  Unsupported protocol: amqp1.0

To your point, I assumed that this extra connection option is what would
trigger the loading of the proton module.  I've connected to this endpoint
via the proton C library directly, so I know it works, but I don't know how
to tell the C++ Qpid library to use proton in this example.

Thanks again,
Paul


On Tue, Jan 15, 2013 at 5:26 PM, Steve Huston <sh...@riverace.com> wrote:

> Hi Paul,
>
> When you built Qpid 0.20-rc4 and started the broker  (I assume that's the
> broker you ran; let me know if this is not true) did you load the proton
> module explicitly? Although the build system found it and built it, my
> understanding is that it's built as a loadable module, not built into the
> broker proper.
>
> -Steve
>
> > -----Original Message-----
> > From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> > Sent: Tuesday, January 15, 2013 5:14 PM
> > To: users@qpid.apache.org
> > Subject: Activating amqp 1.0 / proton in C++ messaging example
> >
> > Hello.  I've had proton installed for a while, coding directly against
> it's C API
> > (connecting to Azure ServiceBus).  Now I want to connect via c++ through
> > Qpid itself.  I've built Qpid 0.20-rc4 and the build output indicates
> that it
> > *does* find the proton libraries and that amqp 1.0 support is enabled.
> >
> > When I run the "client" c++ example (in cpp/examples/messaging) without
> > specifying a protocol option, I get "error Caught exception in state: 3
> with
> > event: 1: Unsupported version: 1-0 supported version 0-10" (i.e. it's
> trying
> > amqp 0.10 and not 1.0).  However, when I add the connection option
> > "protocol: amqp1.0" I get an error stating that this is an "Unsupported
> > protocol".
> >
> > Is there a different connection option I need to use to trigger the use
> of the
> > proton library / amqp 1.0?
> >
> > Thanks!
> >
> > - Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

RE: Activating amqp 1.0 / proton in C++ messaging example

Posted by Steve Huston <sh...@riverace.com>.
Hi Paul,

When you built Qpid 0.20-rc4 and started the broker  (I assume that's the broker you ran; let me know if this is not true) did you load the proton module explicitly? Although the build system found it and built it, my understanding is that it's built as a loadable module, not built into the broker proper.

-Steve

> -----Original Message-----
> From: Paul O'Fallon [mailto:paul@ofallonfamily.com]
> Sent: Tuesday, January 15, 2013 5:14 PM
> To: users@qpid.apache.org
> Subject: Activating amqp 1.0 / proton in C++ messaging example
> 
> Hello.  I've had proton installed for a while, coding directly against it's C API
> (connecting to Azure ServiceBus).  Now I want to connect via c++ through
> Qpid itself.  I've built Qpid 0.20-rc4 and the build output indicates that it
> *does* find the proton libraries and that amqp 1.0 support is enabled.
> 
> When I run the "client" c++ example (in cpp/examples/messaging) without
> specifying a protocol option, I get "error Caught exception in state: 3 with
> event: 1: Unsupported version: 1-0 supported version 0-10" (i.e. it's trying
> amqp 0.10 and not 1.0).  However, when I add the connection option
> "protocol: amqp1.0" I get an error stating that this is an "Unsupported
> protocol".
> 
> Is there a different connection option I need to use to trigger the use of the
> proton library / amqp 1.0?
> 
> Thanks!
> 
> - Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org