[rabbitmq-discuss] Breaking API changes in JAva API 2.7.0

Irmo Manie irmo.manie at gmail.com
Thu Nov 10 15:16:50 GMT 2011


Hi guys,

I was eager to update to the 2.7.0 java client, but when I dropped the
new jar in I ran into some braking changes (again I must really say
here).

I see that i.e. the connection factory now takes an optional executor
service as parameter for the channel threads (which is very nice
actually!).
With that change, the method for creating a new connection taking an
array of addresses is now gone and moved into a private method
together with he executor service parameter:

private Connection newConnection(ExecutorService executor, Address[] addrs)

This must be a mistake, because the public api now has no way of
passing in an array of addresses anymore for the connection, but the
implementation still uses this in the private method. This is now all
the public api offers:

public Connection newConnection()
public Connection newConnection(ExecutorService executor)

I am missing:
public Connection newConnection(Adress[] addrs)

And actually the private one could be publis too I reckon?
public Connection newConnection(Adress[] addrs, ExecutorService executor)


Also: why are the connection factory defaults private all of a sudden?
They are useful if you build an api around the java client and it
doesn't harm to keep this kind of static info into the public right?

These are the things I ran into and switched back again to 2.6.1,
because I 'need' the connection to multiple addresses to connect to a
cluster.

- Irmo


More information about the rabbitmq-discuss mailing list