final String queueName = QUEUE_NAME.resolveModelAttribute(context, operation).asString();
String json = control.listMessagesForSubscriptionAsJSON(queueName);
context.getResult().set(ModelNode.fromJSONString(json));
} else if (LIST_MESSAGES_FOR_SUBSCRIPTION_AS_JSON.equals(operationName)) {
final String queueName = QUEUE_NAME.resolveModelAttribute(context, operation).asString();
context.getResult().set(control.listMessagesForSubscriptionAsJSON(queueName));
} else if (COUNT_MESSAGES_FOR_SUBSCRIPTION.equals(operationName)) {
String clientId = CLIENT_ID.resolveModelAttribute(context, operation).asString();
String subscriptionName = SUBSCRIPTION_NAME.resolveModelAttribute(context, operation).asString();
String filter = resolveFilter(context, operation);
context.getResult().set(control.countMessagesForSubscription(clientId, subscriptionName, filter));