Connecting to an Apache Qpid broker queue using lite.

Oct 21, 2015 at 11:56 AM
I need help with this, I've been looking over documentation and I have a hard time finding examples for this case.
string broker = "amqp://";
            string outQueue = "toVCC";
            string inQueue = "fromVCC";

            Connection.DisableServerCertValidation = true;

            Connection connection = null;

                Address address = new Address(broker);
                connection = new Connection(address);
                Session session = new Session(connection);
                SenderLink sender = new SenderLink(session, "sendAndRecieve.send", broker + "/" + outQueue);
                Message message = new Message("Hello");
I get an AMQP exception amqp:connection:forced some times and
Operation Send not possible with state End or something similar to that.

what I basically need help with is how to properly address the queue which is hosted by apache qpid.
Oct 28, 2015 at 1:07 PM
Make sure qpidd is running AMQP 1.0
The 'connection forced' error probably indicates that you are not creating the connection which is sometimes due to an AMQP protocol version mismatch. First check that the Apache Qpid (qpidd) broker is running AMQP 1.0. If you are building qpidd yourself make sure to load the amqp.dll (or on linux - with an explicit
--load-module amqp.dll
Alternatively, the Qpid broker can load the dll with a --module-dir \some\path command line arg where the path holds the amqp.dll file.

If you are building qpidd yourself and the amqp.dll module is missing then you must also build AMQP 1.0 support that comes with qpid-proton. The easiest way to integrate qpid and qpid-proton is through a shared installation folder specified on the cmake command line.
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=D:\users\qpid\install
Run cmake using the same cmake arguments for qpid and proton, make and install qpid-proton, then make qpidd. Qpidd will find proton and compile the amqp.dll file to include AMQP 1.0 support.

Make sure the resources you need already exist in the Qpid broker
Use some other management tool or configuration program to create the queues in the broker.

Just use the queue name
In your code simply use outQueue to name the resource in the broker. Don't prefix this name with the broker Url string.