Examples of SlowConsumerDetectionQueueConfiguration


Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

   
    private void processBinding(Binding binding)
    {
        AMQQueue queue = binding.getQueue();
       
        SlowConsumerDetectionQueueConfiguration config =
            queue.getConfiguration().getConfiguration(SlowConsumerDetectionQueueConfiguration.class.getName());
        if (config != null)
        {
            _cache.add(queue);
        }
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

        {
            CurrentActor.get().message(SlowConsumerDetectionMessages.CHECKING_QUEUE(q.getName()));
           
            try
            {
                final SlowConsumerDetectionQueueConfiguration config =
                    q.getConfiguration().getConfiguration(SlowConsumerDetectionQueueConfiguration.class.getName());
                if (checkQueueStatus(q, config))
                {
                    final SlowConsumerPolicyPlugin policy = config.getPolicy();
                    if (policy == null)
                    {
                        // We would only expect to see this during shutdown
                        getLogger().warn("No slow consumer policy for queue " + q.getName());
                    }
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

     * Here we need to catch the {@link ConfigurationException} that ensues due to lack
     * of a policy plugin.
     */
    public void testConfigLoadingValidConfig()
    {
        SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("messageAge", "60000");
        xmlconfig.addProperty("depth", "1024");
        xmlconfig.addProperty("messageCount", "10");

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("No Policies are avaialbe to load in a unit test");
        }
        catch (ConfigurationException e)
        {
            assertTrue("Exception message incorrect, was: " + e.getMessage(),
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

     * When we do not specify any control value then a {@link ConfigurationException}
     * must be thrown to remind us.
     */
    public void testConfigLoadingMissingConfig()
    {
        SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("No Policies are avaialbe to load in a unit test");
        }
        catch (ConfigurationException e)
        {

View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

     * Here we need to catch the {@link ConfigurationException} that ensues due to lack
     * of a policy plugin.
     */
    public void testConfigLoadingMessageAgeOk()
    {
        SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("messageAge", "60000");

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("No Policies are avaialbe to load in a unit test");
        }
        catch (ConfigurationException e)
        {
            assertTrue("Exception message incorrect, was: " + e.getMessage(),
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

     * Here we need to catch the {@link ConfigurationException} that ensues due to lack
     * of a policy plugin.
     */
    public void testConfigLoadingDepthOk()
    {
        SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("depth", "1024");

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("No Policies are avaialbe to load in a unit test");
        }
        catch (ConfigurationException e)
        {
            assertTrue("Exception message incorrect, was: " + e.getMessage(),
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

     * Here we need to catch the {@link ConfigurationException} that ensues due to lack
     * of a policy plugin.
     */
    public void testConfigLoadingMessageCountOk()
    {
        SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("messageCount", "10");

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("No Policies are avaialbe to load in a unit test");
        }
        catch (ConfigurationException e)
        {
            assertTrue("Exception message incorrect, was: " + e.getMessage(),
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

        {
            CurrentActor.get().message(SlowConsumerDetectionMessages.CHECKING_QUEUE(q.getName()));
           
            try
            {
                SlowConsumerDetectionQueueConfiguration config =
                    q.getConfiguration().getConfiguration(SlowConsumerDetectionQueueConfiguration.class.getName());
                if (checkQueueStatus(q, config))
                {
                    config.getPolicy().performPolicy(q);
                }
            }
            catch (Exception e)
            {
                // Don't throw exceptions as this will stop the house keeping task from running.
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

   
    private void processBinding(Binding binding)
    {
        AMQQueue queue = binding.getQueue();
       
        SlowConsumerDetectionQueueConfiguration config =
            queue.getConfiguration().getConfiguration(SlowConsumerDetectionQueueConfiguration.class.getName());
        if (config != null)
        {
            _cache.add(queue);
        }
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

     * Here we need to catch the {@link ConfigurationException} that ensues due to lack
     * of a policy plugin.
     */
    public void testConfigLoadingValidConfig()
    {
        SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("messageAge", "60000");
        xmlconfig.addProperty("depth", "1024");
        xmlconfig.addProperty("messageCount", "10");

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("No Policies are avaialbe to load in a unit test");
        }
        catch (ConfigurationException e)
        {
            assertTrue("Exception message incorrect, was: " + e.getMessage(),
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.