On 2 August 2017 at 07:50, Rob Godfrey <[email protected]> wrote: > On 2 August 2017 at 00:15, [email protected] <[email protected]> wrote: > >> Sorry for being so dense, but... >> >> Clearly, I am assuming something about the broker >> distribution that is not true. Specifially, I am assuming >> that the qpid broker distribution is self contained. >> [Judging from the replies, this assumption may be false.] >> >> > Which distribution are you talking about? For 6.1.4 there is a combined > "Qpid for Java 6.1.4" *source* distribution (containing both the Qpid > Broker for Java and Qpid JMS for AMQP 0-9-1/0-10 source code), and a "Qpid > Broker for Java 6.1.4" binary distribution. There is no *Qpid Broker for > Java* distribution which includes examples. > > For historical reasons the source code for the Broker for Java and the JMS > for AMQP 0-x client were in the same repository, and released as a combined > source package. These two components have now been separated, and so the > 6.1.x line is the last line where this will be true. > > >> So, my confusion comes from the above assumption >> plus the fact that the qpid broker distribution comes >> with a subdirectory of examples. >> > > The *broker* distribution does not have an examples directory. The > combined broker and JMS for AMQP 0-x source distribution *does* have > examples. These examples are for the JMS for AMQP 0-x component, and could > be used against any broker or service that offers AMQP 0-9-1 or AMQP 0-10 > (such as the Qpid C++ broker, or (with some caveats) RabbitMQ). > > >> I again assume that if I follow the directions, >> I can execute those examples. without recourse to >> any other code. Instead, those examples fail to work for me. >> >> What am I missing? >> > > An AMQP broker should work with any clients which support the same AMQP > version. Unless there are other reasons to do so (such as the shared > codebase) there is no reason why a broker distribution should include an > AMQP client. > > Now, I agree that if you follow instructions in the source bundle for > running examples, they should work - so we should look into this; however > since these examples are for the AMQP 0-x client, and in another of you > mails you said you needed AMQP 1.0, the fact that this may be broken > doesn't seem like it should actually matter to you. You would seem to want > to get an AMQP 1.0 client (e.g. the separate Qpid JMS client for AMQP 1.0) > and run any examples from the client which uses the AMQP 1.0 protocol. > > -- Rob >
As Rob said, it sounds like you are using the combined source release. I just tried the examples from there and didn't find any issue with them, though I am running things on Linux so its possible there are still Windows+Cygwin specific issues you are hitting. I grabbed the source release, built the bits, and changed to the broker modules target dir (where its binary package is built) as follows: wget http://mirror.ox.ac.uk/sites/rsync.apache.org/qpid/java/6.1.4/qpid-java-6.1.4.tar.gz wget http://www.apache.org/dist/qpid/java/6.1.4/qpid-java-6.1.4.tar.gz.sha sha512sum -c qpid-java-6.1.4.tar.gz.sha tar -xzvf qpid-java-6.1.4.tar.gz cd qpid-java-6.1.4/ mvn clean package -DskipTests cd broker/target/ I started the broker like so: tar -xzvf qpid-broker-6.1.4-bin.tar.gz cd qpid-broker/6.1.4/ export QPID_WORK=`pwd` bin/qpid-server In another terminal, I ran the AMQP 0-x JMS examples you have been trying along the lines of the following: cd <path.to.orig.dir>/qpid-java-6.1.4/client/example/ mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests java -cp "target/classes/:target/dependency/*" org.apache.qpid.example.Hello I'd expect the second and third group of instructions to be very similar to what you would do with the individual broker and AMQP 0-x JMS client binary distributions. That said, you've said you actually want AMQP 1.0 so you should grab the newer client and follow its example instructions instead. Essentially: start the broker, create the queue [1], then build and run the clients examples with something like: mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests java -DUSER=guest -DPASSWORD=guest -cp "target/classes/:target/dependency/*" org.apache.qpid.jms.example.HelloWorld [1] This can be done via the brokers web management which defaults to http://localhost:8080, default user detail examples are in etc/passwd, e.g try admin:admin. Double click the 'default' virthuost to open it. Hit Add Queue, enter "queue" as the name, hit Create Queue. Final aside: Rob has added the users@ mailing list to his reply as that is where the thread originally started and where discussion such as this belongs, please keep users@ in respones. Robbie --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
