mirror of https://github.com/apache/activemq.git
Support configuring a connectUrl on the leveldb store in case your running in a system like OpenShift where clients connect to a different ip:port from the one that the sever binds.
This commit is contained in:
parent
b9696ac80b
commit
b76d8318d7
|
@ -78,6 +78,10 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
|
||||||
|
|
||||||
@BeanProperty
|
@BeanProperty
|
||||||
var hostname: String = _
|
var hostname: String = _
|
||||||
|
|
||||||
|
@BeanProperty
|
||||||
|
var connectUrl: String = _
|
||||||
|
|
||||||
@BeanProperty
|
@BeanProperty
|
||||||
var bind = "tcp://0.0.0.0:61619"
|
var bind = "tcp://0.0.0.0:61619"
|
||||||
|
|
||||||
|
@ -371,10 +375,14 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
def address(port: Int) = {
|
def address(port: Int) = {
|
||||||
|
if( connectUrl==null ) {
|
||||||
if (hostname == null) {
|
if (hostname == null) {
|
||||||
hostname = machine_hostname
|
hostname = machine_hostname
|
||||||
}
|
}
|
||||||
"tcp://" + hostname + ":" + port
|
"tcp://" + hostname + ":" + port
|
||||||
|
} else {
|
||||||
|
connectUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override def size: Long = {
|
override def size: Long = {
|
||||||
|
|
Loading…
Reference in New Issue