You're not starting in management mode (and you probably don't want to :-) ), so setting the management port overrides is not really what you want.
Making the Broker easier to embed and start programmatically for unit tests, etc... is on my personal roadmap (I even have some work somewhere on my laptop that I should dig out), but for the moment, you can alter the ports that are used on startup by either creating your own initial config file, or simply by setting system properties. The default initial config file can be seen here: http://svn.apache.org/repos/asf/qpid/java/tags/6.0.0/broker-core/src/main/resources/initial-config.json In particular the following lines are of interest in terms of ports: "port" : "${qpid.amqp_port}", and... "port" : "${qpid.http_port}", (By default in Qpid 6.0, the JMX ports are not enabled/created.) So, to set the HTTP port to 9090, you could just do System.setProperty("qpid.http.port", "9090"); before starting up the broker. For proper unit testing you'd probably want a different initial config using in-memory stores / config. You might also want to set the ports to use to be port 0 (which will allocate a random free port). Hope this helps, Rob On 31 January 2016 at 22:09, Alex O'Ree <[email protected]> wrote: > I've made some progress using 6.0.0. > > org.apache.qpid.server.Broker broker = new Broker(); > BrokerOptions options = new BrokerOptions(); > options.setManagementModeHttpPortOverride(9090); > options.setManagementModeJmxPortOverride(9099); > options.setManagementMode(false); > options.setStartupLoggedToSystemOut(true); > broker.startup(options); > > > The issue is that I have a port conflict on port 8080 and setting the > ManagementModeHttpPortOverride doesn't seem to be honored. Any ideas? > > On Sun, Jan 31, 2016 at 4:07 PM, Alex O'Ree <[email protected]> wrote: > > I'm working on a project that needs to fire up a qpid java broker, > > send some messages, wait for replies, then shutdown, in the context of > > a java unit test in maven. I saw that this used to be possible on SO > > at one point. Anyhow, is there any examples on how to do this? Perhaps > > I could reuse one of the existing unit tests from qpid? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
