1 Reply Latest reply on Mar 18, 2009 11:38 AM by martinmurphy

    What will happen if a SEDA queue is full ?

    smxnoob

      Hi,

       

      I want to know how does a SEDA queue deal with incoming message when it is overloaded or full ?

       

      Regards,

      Servicemix Noob ?:|

        • 1. Re: What will happen if a SEDA queue is full ?
          martinmurphy

          The SEDA queue is implemented using java.util.concurrent classes, in particular the ThreadPoolExecutor. Each component has a default intial thread pool of four and a queue size of 1024. The maximum size for the thread pool is unlimited, so by default you should never end up with an overloaded queue.

           

          That said, FUSE ESB does over-ride the properties of the default config in conf/servicemix.xml

           

          <sm:executorFactory>
            <bean class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl">
              <property name="defaultConfig">
                  <bean class="org.apache.servicemix.executors.impl.ExecutorConfig">
                    <property name="corePoolSize" value="${servicemix.corePoolSize}"></property>
                    <property name="maximumPoolSize" value="${servicemix.maximumPoolSize}"></property>
                    <property name="queueSize" value="${servicemix.queueSize}"></property>
                  </bean>
              </property>
            </bean>
          </sm:executorFactory>
          

           

          This picks up it's placeholder properties from the servicemix.properties file:

           

          servicemix.corePoolSize    = 16
          servicemix.maximumPoolSize = 32
          servicemix.queueSize       = 256
          

           

          So in a standard FUSE ESB installation the max thread pool is 32 and the queue is 256.

           

          If a message fails to be enqueued in the thread pool a javax.jbi.messaging.MessagingException will be thrown. This then has to be handled by the calling producer that placed the message exchange on the NMR.

           

          Hope that helps