You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "zhaoyi0113@gmail.com" <zh...@gmail.com> on 2010/09/01 14:26:52 UTC

How to configure queue in config.xml file

I am using qpid-6.0 Java broker. I modified the maximumQueueDepth,
maximumMessageSize in %QPID_HOME%\etc\config.xml file, then I start qpid
java broker. The value I set doesn't have any impact on the broker. I wander
whether the configuration file works for these values.
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5486666.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.

Marnie McCormack wrote:
> 
> And you can use Producer Side Flow Control OR Slow Consumer Disconnect
> (trunk only) if you wish to prevent queue depth growing beyond a defined
> threshold.
> 
> Regards,
> Marnie
> 

How can I use them to set queue size or message counts?
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5524891.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by Robbie Gemmell <ro...@gmail.com>.
The alerting values can be set to default *per queue* values at the
virtualhost level by declaring the values at the
'virtualhosts.virtualhost.<vhost-name>.queues' level of the XML
configuration. So if setting maxQueueDepth to 1 at that level of
configuration, then if *any* queue were to have 2 messages or more on
it alerts would be generated into the log (and via JMX if subscribed
to the particular queue's notifications) at the configured frequency
(which can be set per-virtualhost, and defaults to 30sec I believe).

Further to this, specific alerting threshold values for any queues
created using config.xml can also be declared, at the
'virtualhosts.virtualhost.<vhost-name>.queues.queue.<queue-name>'
level.

There are examples of all such usage in the sample config.xml provided
in the distribution or available from the svn repository.

Robbie

On 17 September 2010 14:53, zhaoyi0113@gmail.com <zh...@gmail.com> wrote:
>
> If the alters are set per virtualhost, how do they relate to queue size,
> message count etc? Could you give me an example for one use case of these
> value? Let say we set queue size to 1, then how it impact the alerts?
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5542823.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
If the alters are set per virtualhost, how do they relate to queue size,
message count etc? Could you give me an example for one use case of these
value? Let say we set queue size to 1, then how it impact the alerts? 
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5542823.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "Sorin S." <ss...@gmail.com>.
Because an unbound growing queue indicates there is no consumers, and
usually this indicates a problem. The queues
are not intended for storage but for consumption. The alerts are set
per virtualhost, not per queue (as you might create queues on the fly
and you might still want the same alerting features).

HTH,
Sorin



On Thu, Sep 16, 2010 at 2:49 AM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> These definitions are meaningless to alerting. Why alerting have message
> count, queue depth, message size and message age? All these should be
> related to broker queue.
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5536777.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
These definitions are meaningless to alerting. Why alerting have message
count, queue depth, message size and message age? All these should be
related to broker queue.
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5536777.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "Sorin S." <ss...@gmail.com>.
Hi,
The below are meant for alerting purposes only (used by
HouseKeepingTask) and the name is self-explanatory, note that these
are indicative thresholds and not limits.

Cheers,

Sorin



On Wed, Sep 15, 2010 at 1:35 PM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> Where can I find the definition for these values? How can I use them for
> queue size?
>
>          <maximumMessageCount>2</maximumMessageCount>
>          <maximumQueueDepth>1</maximumQueueDepth>
>          <maximumMessageSize>1</maximumMessageSize>
>          <maximumMessageAge>1</maximumMessageAge>
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5534201.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
Where can I find the definition for these values? How can I use them for
queue size?

          <maximumMessageCount>2</maximumMessageCount>
          <maximumQueueDepth>1</maximumQueueDepth>
          <maximumMessageSize>1</maximumMessageSize>
          <maximumMessageAge>1</maximumMessageAge> 
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5534201.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.

Andrew Kennedy wrote:
> 
> On 7 Sep 2010, at 02:58, zhaoyi0113@gmail.com wrote:
> 
> 
> In other words, you are setting the thresholds for notifications to  
> be generated regarding these conditions on a per-queue basis. This  
> allows automated log-analysis tools or monitoring systems to pick  
> them up in real-time and respond accordingly. Perhaps by displaying  
> an alert in the network operations centre or sending an SMS message  
> to your on-call support staff, who can then take appropriate action -  
> such as verifying that a consumer process is still running, or a  
> client machine is online.
> 
> Andrew.
> 
> 

Do you mean that this configuration will allow the maximum notification
size? Take the <maximumMessageCount>2</maximumMessageCount>  as an example,
the maximum message count notification will be 2. How about other
configurations like:
            <maximumQueueDepth>1</maximumQueueDepth>
           <maximumMessageSize>1</maximumMessageSize>
           <maximumMessageAge>1</maximumMessageAge> 



-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5524889.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by Andrew Kennedy <an...@gmail.com>.
On 7 Sep 2010, at 02:58, zhaoyi0113@gmail.com wrote:
>
> based on your reply, these value will not have any impact, so what  
> do these
> values mean?
>
>          <maximumMessageCount>2</maximumMessageCount>
>          <maximumQueueDepth>1</maximumQueueDepth>
>          <maximumMessageSize>1</maximumMessageSize>
>          <maximumMessageAge>1</maximumMessageAge>

As I said,

> [...] these are simply thresholds above which notifications will be  
> sent [...] you will not be prevented from sending more messages.


In other words, you are setting the thresholds for notifications to  
be generated regarding these conditions on a per-queue basis. This  
allows automated log-analysis tools or monitoring systems to pick  
them up in real-time and respond accordingly. Perhaps by displaying  
an alert in the network operations centre or sending an SMS message  
to your on-call support staff, who can then take appropriate action -  
such as verifying that a consumer process is still running, or a  
client machine is online.

Andrew.
-- 
-- andrew d kennedy ? do not fold, bend, spindle, or mutilate ;
-- http://grkvlt.blogspot.com/ ? edinburgh : +44 7941 197 134 ;

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
based on your reply, these value will not have any impact, so what do these
values mean?

         <maximumMessageCount>2</maximumMessageCount>
         <maximumQueueDepth>1</maximumQueueDepth>
         <maximumMessageSize>1</maximumMessageSize>
         <maximumMessageAge>1</maximumMessageAge> 
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5504941.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by Marnie McCormack <ma...@googlemail.com>.
And you can use Producer Side Flow Control OR Slow Consumer Disconnect
(trunk only) if you wish to prevent queue depth growing beyond a defined
threshold.

Regards,
Marnie

On Sat, Sep 4, 2010 at 1:40 AM, Andrew Kennedy <
andrewinternational@gmail.com> wrote:

> On 2 Sep 2010, at 02:23, zhaoyi0113@gmail.com wrote:
>
>> [...] I want to know how the queue size affected my application.
>>
>
> Hi.
>
> As Marnie has already said, you should now get both JMX notifications and
> messages in the broker log file if the settings below are attained by the
> specified queue. Your XML configuration is correctly set up to achieve this.
> The frequency of the housekeeping thread can be configured as follows, per
> virtual host (this example gives a 20s delay):
>
> <virtualhosts>
>    <virtualhost>
>        <name>example</name>
>        <example>
>            <housekeeping>
>                <threadCount>2</threadCount>
>                <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
>            </housekeeping>
>            <!-- etc. -->
>        </example>
>    </virtualhost>
> </virtualhosts>
>
>  <maximumMessageCount>2</maximumMessageCount>
>>
>
>         <maximumQueueDepth>1</maximumQueueDepth>
>>         <maximumMessageSize>1</maximumMessageSize>
>>         <maximumMessageAge>1</maximumMessageAge>
>>
>
> Bear in mind that these are simply thresholds above which notifications
> will be sent, *not* hard limits or maxima - you will not be prevented from
> sending more messages.
>
> Andrew.
> --
> -- andrew d kennedy ? do not fold, bend, spindle, or mutilate ;
> -- http://grkvlt.blogspot.com/ ? edinburgh : +44 7941 197 134 ;
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: How to configure queue in config.xml file

Posted by Andrew Kennedy <an...@gmail.com>.
On 2 Sep 2010, at 02:23, zhaoyi0113@gmail.com wrote:
> [...] I want to know how the queue size affected my application.

Hi.

As Marnie has already said, you should now get both JMX notifications  
and messages in the broker log file if the settings below are  
attained by the specified queue. Your XML configuration is correctly  
set up to achieve this. The frequency of the housekeeping thread can  
be configured as follows, per virtual host (this example gives a 20s  
delay):

<virtualhosts>
     <virtualhost>
         <name>example</name>
         <example>
             <housekeeping>
                 <threadCount>2</threadCount>
                 <expiredMessageCheckPeriod>20000</ 
expiredMessageCheckPeriod>
             </housekeeping>
             <!-- etc. -->
         </example>
     </virtualhost>
</virtualhosts>

>  <maximumMessageCount>2</maximumMessageCount>

> 	 <maximumQueueDepth>1</maximumQueueDepth>
> 	 <maximumMessageSize>1</maximumMessageSize>
> 	 <maximumMessageAge>1</maximumMessageAge>

Bear in mind that these are simply thresholds above which  
notifications will be sent, *not* hard limits or maxima - you will  
not be prevented from sending more messages.

Andrew.
-- 
-- andrew d kennedy ? do not fold, bend, spindle, or mutilate ;
-- http://grkvlt.blogspot.com/ ? edinburgh : +44 7941 197 134 ;

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How to configure queue in config.xml file

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
This is what I set in the config.xml file. I want to use the exchange with
the name "exchange" and the queue "queue". I want to know how the queue size
affected my application. I set all the message related values to 1 and send
10 messages to that queue. Then I subscribe to that queue and I will get the
10 messages. If the message size, message age and queue depth maximum are 1,
why will the consumer get all the 10 messages?

<virtualhost>
        	<name>geocomm</name>
        	<geocomm>
        		<store>
                    		<class>org.apache.qpid.server.store.MemoryMessageStore
                    		</class>
                	</store>
                	<queues>
                		 <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
                   		 <maximumMessageCount>2</maximumMessageCount>
                		<queue>
                			<name>queue</name>
                			<queue>
	                			<exchange>exchange</exchange>
	                			<maximumQueueDepth>1</maximumQueueDepth>
			                    
			                            <maximumMessageSize>1</maximumMessageSize>
			                      
			                            <maximumMessageAge>1</maximumMessageAge>
			                      
	                		</queue>
                		</queue>
                		
                	</queues>
        	</geocomm>
        </virtualhost>
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-configure-queue-in-config-xml-file-tp5486666p5489440.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


How to configure queue in config.xml file

Posted by Marnie McCormack <ma...@googlemail.com>.
 Hi,

Once you've set these values you should start seeing alerts being generated
in the broker log file and JMX notifications generated once the thresholds
specified have been triggered.

Can you show us what you've set in the config file and what you're testing
it with i.e. what you're doing to trigger the thresholds ?

Thanks,
Marnie

  On Wed, Sep 1, 2010 at 1:26 PM, zhaoyi0113@gmail.com <zhaoyi0113@gmail.com
> wrote:

>
> I am using qpid-6.0 Java broker. I modified the maximumQueueDepth,
> maximumMessageSize in %QPID_HOME%\etc\config.xml file, then I start qpid
> java broker. The value I set doesn't have any impact on the broker. I
> wander
> whether the configuration file works for these values.
>
>