mirror of https://github.com/apache/activemq.git
updates for https://issues.apache.org/activemq/browse/AMQ-834 and https://issues.apache.org/activemq/browse/AMQ-833
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@452346 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fa4279c433
commit
62cb1b6cb0
|
@ -170,16 +170,25 @@ public class ManagedRegionBroker extends RegionBroker {
|
|||
|
||||
public ObjectName registerSubscription(ConnectionContext context, Subscription sub) {
|
||||
Hashtable map = brokerObjectName.getKeyPropertyList();
|
||||
String name="";
|
||||
String persistentMode = "";
|
||||
String destinationType = "";
|
||||
String destinationName = "";
|
||||
String clientID = "";
|
||||
SubscriptionKey key = new SubscriptionKey(context.getClientId(), sub.getConsumerInfo().getSubcriptionName());
|
||||
if (sub.getConsumerInfo().isDurable()) {
|
||||
name=key.toString();
|
||||
persistentMode = "Durable";
|
||||
|
||||
} else {
|
||||
name=sub.getConsumerInfo().getConsumerId().toString();
|
||||
persistentMode = "Non-Durable";
|
||||
}
|
||||
|
||||
destinationType = sub.getConsumerInfo().getDestination().getDestinationTypeAsString();
|
||||
destinationName = sub.getConsumerInfo().getDestination().getPhysicalName();
|
||||
clientID = context.getClientId();
|
||||
|
||||
try {
|
||||
ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName=" + map.get("BrokerName")
|
||||
+","+"Type=Subscription,"+"active=true,"+"name="+JMXSupport.encodeObjectNamePart(name)+"");
|
||||
+ "," + "Type=Subscription, persistentMode=" + persistentMode + ", destinationType=" + destinationType + " ,destinationName=" + JMXSupport.encodeObjectNamePart(destinationName) + " ,clientID=" + JMXSupport.encodeObjectNamePart(clientID) + "");
|
||||
SubscriptionView view;
|
||||
if (sub.getConsumerInfo().isDurable()) {
|
||||
view = new DurableSubscriptionView(this, context.getClientId(), sub);
|
||||
|
|
Loading…
Reference in New Issue