This commit is contained in:
Michael Andre Pearce 2018-10-29 20:42:05 +00:00
commit 16bcdf90b5
6 changed files with 25 additions and 3 deletions

View File

@ -62,6 +62,11 @@ var ARTEMIS = (function(ARTEMIS) {
displayName: 'Queue Type',
width: '*'
},
{
field: 'filter',
displayName: 'Filter',
width: '*'
},
{
field: 'address',
displayName: 'Address',

View File

@ -58,6 +58,7 @@ public class ConsumerView extends ActiveMQAbstractView<ServerConsumer> {
.add("protocol", toString(consumer.getConnectionProtocolName()))
.add("queue", toString(consumer.getQueueName()))
.add("queueType", toString(consumer.getQueueType()).toLowerCase())
.add("filter", toString(consumer.getFilterString()))
.add("address", toString(consumer.getQueueAddress()))
.add("localAddress", toString(consumer.getConnectionLocalAddress()))
.add("remoteAddress", toString(consumer.getConnectionRemoteAddress()))
@ -89,6 +90,8 @@ public class ConsumerView extends ActiveMQAbstractView<ServerConsumer> {
return consumer.getQueueName();
case "queueType":
return consumer.getQueueType();
case "filter":
return consumer.getFilterString();
case "localAddress":
return consumer.getConnectionLocalAddress();
case "remoteAddress":

View File

@ -22,7 +22,7 @@ import org.apache.activemq.artemis.core.server.ServerConsumer;
public class ConsumerFilterPredicate extends ActiveMQFilterPredicate<ServerConsumer> {
enum Field {
ID, SESSION_ID, QUEUE, ADDRESS, USER, PROTOCOL, CLIENT_ID, LOCAL_ADDRESS, REMOTE_ADDRESS
ID, SESSION_ID, QUEUE, FILTER, ADDRESS, USER, PROTOCOL, CLIENT_ID, LOCAL_ADDRESS, REMOTE_ADDRESS
}
private Field f;
@ -50,6 +50,8 @@ public class ConsumerFilterPredicate extends ActiveMQFilterPredicate<ServerConsu
return matches(consumer.getQueue().getAddress());
case QUEUE:
return matches(consumer.getQueue().getName());
case FILTER:
return matches(consumer.getFilterString());
case PROTOCOL:
return matches(server.getSessionByID(consumer.getSessionID()).getRemotingConnection().getProtocolName());
case CLIENT_ID:

View File

@ -27,12 +27,14 @@ public interface ConsumerInfo {
/** @return name of the queue that is being consumed */
SimpleString getQueueName();
/** @return name of the queue that is being consumed */
/** @return routing type of the queue that is being consumed */
RoutingType getQueueType();
/** @return name of the queue that is being consumed */
/** @return address of the queue that is being consumed */
SimpleString getQueueAddress();
SimpleString getFilterString();
String getSessionName();
String getConnectionClientID();

View File

@ -479,6 +479,11 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
return filter;
}
@Override
public SimpleString getFilterString() {
return filter == null ? null : filter.getFilterString();
}
@Override
public synchronized void close(final boolean failed) throws Exception {

View File

@ -194,6 +194,11 @@ public class DummyServerConsumer implements ServerConsumer {
return null;
}
@Override
public SimpleString getFilterString() {
return null;
}
@Override
public List<MessageReference> getDeliveringMessages() {
return null;