Examples of removeMessages()


Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

         prod.send(msg);
      }
     
      JMSQueueControl control = createManagementControl(pagedQueue);
     
      assertEquals(100, control.removeMessages("     "));
     
     
     
      session.start();
     
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

         prod.send(msg);
      }
     
      JMSQueueControl control = createManagementControl(pagedQueue);
     
      assertEquals(100, control.removeMessages("even=true"));
     
      session.start();
     
      ClientConsumer consumer = session.createConsumer(pagedQueue.getAddress());
     
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

         prod.send(msg);
      }
     
      JMSQueueControl control = createManagementControl(pagedQueue);
     
      assertEquals(100, control.removeMessages("     "));
     
     
     
      session.start();
     
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

         prod.send(msg);
      }
     
      JMSQueueControl control = createManagementControl(pagedQueue);
     
      assertEquals(100, control.removeMessages("even=true"));
     
      session.start();
     
      ClientConsumer consumer = session.createConsumer(pagedQueue.getAddress());
     
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

      JMSUtil.sendMessages(queue, 2);

      Assert.assertEquals(2, queueControl.getMessageCount());

      queueControl.removeMessages(null);

      Assert.assertEquals(0, queueControl.getMessageCount());

      Connection connection = JMSUtil.createConnection(InVMConnectorFactory.class.getName());
      connection.start();
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

      message.setStringProperty("foo", "baz");
      producer.send(message);

      Assert.assertEquals(2, queueControl.getMessageCount());

      int removedMatchingMessagesCount = queueControl.removeMessages("foo = 'bar'");
      Assert.assertEquals(1, removedMatchingMessagesCount);

      Assert.assertEquals(1, queueControl.getMessageCount());

      conn.start();
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

                return control.removeMessage(id.asString());
            }

            @Override
            public int removeMessages(String filter) throws Exception {
                return control.removeMessages(filter);
            }

            @Override
            public int expireMessages(String filter) throws Exception {
                return control.expireMessages(filter);
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

    try {
      String destination = getRealDestinationName(dConfig);

      if (dConfig.getDomain() == Domain.QUEUE.getId()) {
        JMSQueueControl queueControl = getQueueControl(destination);
        return queueControl.removeMessages(null);
      } else {
        throw new HermesException("JBoss does not support truncating a durable subscription");
      }
    } catch (HermesException ex) {
      throw ex;
View Full Code Here

Examples of org.hornetq.api.jms.management.TopicControl.removeMessages()

                control.dropAllSubscriptions();
                context.getResult();
            } else if (REMOVE_MESSAGES.equals(operationName)) {
                removeMessagesValidator.validate(operation);
                String filter = operation.hasDefined(FILTER.getName()) ? operation.get(FILTER.getName()).asString() : null;
                context.getResult().set(control.removeMessages(filter));
            } else {
                // Bug
                throw MESSAGES.unsupportedOperation(operationName);
            }
        } catch (RuntimeException e) {
View Full Code Here

Examples of org.hornetq.api.jms.management.TopicControl.removeMessages()

                control.dropAllSubscriptions();
                context.getResult();
            } else if (REMOVE_MESSAGES.equals(operationName)) {
                removeMessagesValidator.validate(operation);
                String filter = operation.hasDefined(FILTER.getName()) ? operation.get(FILTER.getName()).asString() : null;
                context.getResult().set(control.removeMessages(filter));
            } else {
                // Bug
                throw MESSAGES.unsupportedOperation(operationName);
            }
        } catch (RuntimeException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.