This closes #453
This commit is contained in:
commit
bb739be92d
|
@ -115,7 +115,7 @@ public final class ObjectNameBuilder {
|
||||||
* @see DivertControl
|
* @see DivertControl
|
||||||
*/
|
*/
|
||||||
public ObjectName getDivertObjectName(final String name) throws Exception {
|
public ObjectName getDivertObjectName(final String name) throws Exception {
|
||||||
return createObjectName(ObjectNameBuilder.CORE_MODULE, "Divert", name.toString());
|
return createObjectName(ObjectNameBuilder.CORE_MODULE, "Divert", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -267,7 +267,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl {
|
||||||
String subName = null;
|
String subName = null;
|
||||||
|
|
||||||
if (queue.isDurable()) {
|
if (queue.isDurable()) {
|
||||||
Pair<String, String> pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName().toString());
|
Pair<String, String> pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName());
|
||||||
clientID = pair.getA();
|
clientID = pair.getA();
|
||||||
subName = pair.getB();
|
subName = pair.getB();
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl {
|
||||||
String subName = null;
|
String subName = null;
|
||||||
|
|
||||||
if (queue.isDurable() && !queue.getName().startsWith(ResourceNames.JMS_TOPIC)) {
|
if (queue.isDurable() && !queue.getName().startsWith(ResourceNames.JMS_TOPIC)) {
|
||||||
Pair<String, String> pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName().toString());
|
Pair<String, String> pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName());
|
||||||
clientID = pair.getA();
|
clientID = pair.getA();
|
||||||
subName = pair.getB();
|
subName = pair.getB();
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class MQTTPublishManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendServerMessage(int messageId, ServerMessageImpl message, int deliveryCount, int qos) {
|
private void sendServerMessage(int messageId, ServerMessageImpl message, int deliveryCount, int qos) {
|
||||||
String address = MQTTUtil.convertCoreAddressFilterToMQTT(message.getAddress().toString()).toString();
|
String address = MQTTUtil.convertCoreAddressFilterToMQTT(message.getAddress().toString());
|
||||||
|
|
||||||
ByteBuf payload = message.getBodyBufferDuplicate().byteBuf();
|
ByteBuf payload = message.getBodyBufferDuplicate().byteBuf();
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,10 @@ public class MQTTUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String convertCoreAddressFilterToMQTT(String filter) {
|
public static String convertCoreAddressFilterToMQTT(String filter) {
|
||||||
if (filter.startsWith(MQTT_RETAIN_ADDRESS_PREFIX.toString())) {
|
if (filter.startsWith(MQTT_RETAIN_ADDRESS_PREFIX)) {
|
||||||
filter = filter.substring(MQTT_RETAIN_ADDRESS_PREFIX.length(), filter.length());
|
filter = filter.substring(MQTT_RETAIN_ADDRESS_PREFIX.length(), filter.length());
|
||||||
}
|
}
|
||||||
else if (filter.startsWith(MQTT_ADDRESS_PREFIX.toString())) {
|
else if (filter.startsWith(MQTT_ADDRESS_PREFIX)) {
|
||||||
filter = filter.substring(MQTT_ADDRESS_PREFIX.length(), filter.length());
|
filter = filter.substring(MQTT_ADDRESS_PREFIX.length(), filter.length());
|
||||||
}
|
}
|
||||||
return swapMQTTAndCoreWildCards(filter);
|
return swapMQTTAndCoreWildCards(filter);
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext {
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e);
|
throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
target.setAddress(queue.toString());
|
target.setAddress(queue);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//if not dynamic then we use the targets address as the address to forward the messages to, however there has to
|
//if not dynamic then we use the targets address as the address to forward the messages to, however there has to
|
||||||
|
|
|
@ -314,7 +314,7 @@ public class StompDecoder {
|
||||||
headers.put(headerName, headerValue);
|
headers.put(headerName, headerValue);
|
||||||
|
|
||||||
if (headerName.equals(Stomp.Headers.CONTENT_LENGTH)) {
|
if (headerName.equals(Stomp.Headers.CONTENT_LENGTH)) {
|
||||||
contentLength = Integer.parseInt(headerValue.toString());
|
contentLength = Integer.parseInt(headerValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
whiteSpaceOnly = true;
|
whiteSpaceOnly = true;
|
||||||
|
|
|
@ -463,7 +463,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFirstMessageAsJSON() throws Exception {
|
public String getFirstMessageAsJSON() throws Exception {
|
||||||
return toJSON(getFirstMessage()).toString();
|
return toJSON(getFirstMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1127,7 +1127,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
||||||
int sessionCount = 0;
|
int sessionCount = 0;
|
||||||
|
|
||||||
for (Entry<String, ServerSession> sessionEntry : sessions.entrySet()) {
|
for (Entry<String, ServerSession> sessionEntry : sessions.entrySet()) {
|
||||||
if (sessionEntry.getValue().getUsername().toString().equals(username)) {
|
if (sessionEntry.getValue().getUsername().equals(username)) {
|
||||||
sessionCount++;
|
sessionCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue