Package org.apache.qpid.server.configuration.plugins

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


     * 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

     * 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

     * 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

        {
            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

TOP

Related Classes of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration

Copyright © 2018 www.massapicom. 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.