mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2729 - failover uri query parsing
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@943860 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3a64a8eb3
commit
3a6a56c633
|
@ -103,6 +103,7 @@ public class URISupport {
|
||||||
|
|
||||||
public static Map<String, String> parseQuery(String uri) throws URISyntaxException {
|
public static Map<String, String> parseQuery(String uri) throws URISyntaxException {
|
||||||
try {
|
try {
|
||||||
|
uri = uri.substring(uri.lastIndexOf("?") + 1); // get only the relevant part of the query
|
||||||
Map<String, String> rc = new HashMap<String, String>();
|
Map<String, String> rc = new HashMap<String, String>();
|
||||||
if (uri != null) {
|
if (uri != null) {
|
||||||
String[] parameters = uri.split("&");
|
String[] parameters = uri.split("&");
|
||||||
|
|
|
@ -23,7 +23,7 @@ import org.apache.activemq.transport.tcp.TransportUriTest;
|
||||||
public class FailoverUriTest extends TransportUriTest {
|
public class FailoverUriTest extends TransportUriTest {
|
||||||
|
|
||||||
public void initCombosForTestUriOptionsWork() {
|
public void initCombosForTestUriOptionsWork() {
|
||||||
addCombinationValues("prefix", new Object[] {"failover:("});
|
addCombinationValues("prefix", new Object[] {"failover:(", "failover://("});
|
||||||
addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"
|
addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"
|
||||||
, "?wireFormat.tightEncodingEnabled=false)?jms.useAsyncSend=true&jms.copyMessageOnSend=false"
|
, "?wireFormat.tightEncodingEnabled=false)?jms.useAsyncSend=true&jms.copyMessageOnSend=false"
|
||||||
, "?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"});
|
, "?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"});
|
||||||
|
|
Loading…
Reference in New Issue