This is my first day with Apache Proton and Qpid (java-broker version 0.32) and I need a simple send and receive example in Java (no JMS). By poking around I found Send.java and Recv.java neither of which actually work.
On "mng.send() I get
java.io.IOException: An established connection was aborted by the software in your host machine
From stackoverflow and a half dozen other google searches it seems that one must create an "anonymous" security provider first.
How does one do this? I can't guess either the config.json change nor how to use the web interface. The two sentences of prose in the Qpid java broker documentation are not helping me.
On a related note, couldn't I just use "amqp://admin:admin@localhost:5672" (or amqps://admin:admin@localhost ?) and take advantage of the security provider that is already there?
Does anyone have a documented Java example of Send and Recv that is known to actually run on the current version of Qpid and Proton and comes with any prerequisite config.json changes?
To enable
ANONYMOUS
authentication, add an emptyanonymous-auth-manager
tag in the security section of your broker config:default location is
${QPID_HOME}/etc/config.xml
QPID Java Broker with QPID Proton library works without error for anonymous authentication.
Please follow below steps to avoid connection abort for QPID Java Broker 0.32.
And click "Add Provider" enter following details and save, Name: anonymous Type: Anonymous
Now again, go to "Broker" tab and scroll down to locate "Ports" - AMQP. Click AMQP to edit. Select "Authentication Provider" to the one you have created in step #3 above from the drop-down and save.
Try your test code
Here is the working sample in case required:
The Java broker does not support anonymous authentication. I need to switch to the C++ broker.
Qid and Proton still needs a Java tutorial if only so the qpid team can test it.