11 Replies Latest reply on Apr 12, 2011 12:03 AM by nareshpa

    hornetQ message sending process

    nareshpa

      Hi,

       

      I am not able to sending messages more than 2500 per second using HornetQ2.0, can you please help any one what I need to do to send messages more than 2500 per second.

        • 1. hornetQ message sending process
          ataylor

          well its hard as you havent told us anything about your topology, are messages persistant, are you blocking on send etc etc. Theres a section in the user manual about it but ultimately you are constrained by the speed of your network and the speed of your disk

          • 2. hornetQ message sending process
            nareshpa

            Hi Andy,

             

            Thanks for your speed reply...

             

             

            I am using spring 3.0, here one java application sending messages to queue at the same time another java application recieved the messages from same queue and insert into DB.

            • 3. hornetQ message sending process
              ataylor

              that doesnt really tell me a lot about your jms topology. Spring probably complicates matters too

              • 4. Re: hornetQ message sending process
                nareshpa

                Hi Andy,

                 

                   here I am using hornetq-2.0.0.GA and hornatq-2.0.0.GA\config\stand-alone\non-clustered  folder had one hornetq-jms.xml file for the connectionFactory.

                 

                I specified below hornatq-jms.xml file

                 

                   hornetq-2.0.0.GA\config\stand-alone\non-clustered\hornatq-jms.xml

                 

                 

                 

                <configuration xmlns="urn:hornetq"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="urn:hornetq/schema/hornetq-jms.xsd">

                                <connection-factoryname="NettyConnectionFactory">

                 

                                      <connectors>

                                               <connector-refconnector-name="netty"/>

                                     </connectors>

                                     <entries>

                                                <entryname="ConnectionFactory"/>

                                    </entries> 

                               </connection-factory>

                 

                 

                                <queuename="queue.raw">

                                                <entryname="queue.raw"/>

                                </queue>

                 

                </configuration>

                • 5. Re: hornetQ message sending process
                  clebert.suconic

                  Look at the FAQs...

                   

                   

                  If you send persistently, non -transactionally, you are bound to the capacity of your hardware.

                   

                  When you use multiple producers you will be sharing resources of your server among multiple threads.

                   

                   

                  You can disable syncs if you don't care about reliability of your message, as we guarantee delivery when you send persistently. (Having to wait a callback from the server acking the message send...  a bit of synchronously)

                  • 6. Re: hornetQ message sending process
                    clebert.suconic

                    BTW 2.0.0.GA is really old. You should use 2.2.2

                    • 7. Re: hornetQ message sending process
                      nareshpa

                      I need to disable syncs, can you please tell it where I should write disable tag

                      • 8. Re: hornetQ message sending process
                        ataylor

                        <journal-sync-transactional>false</journal-sync-transactional> and <journal-sync-non-transactional>false</journal-sync-non-transactional> in hornetq-configuration.xml

                        • 9. Re: hornetQ message sending process
                          nareshpa

                          Great, here message sending count is increased.  Earlier I was not ableto sent more than 2500, now I am sending around 20,000 messages per second.

                           

                          Any other tags are required to reach  messages count around 70,000 persecond

                           

                          And  message count was decreased around 3000 per second, whenever I started message sending process  to same queue from two java applications.

                          • 10. Re: hornetQ message sending process
                            clebert.suconic

                            You can disable blockings on the connection factory as well:

                             

                            http://docs.jboss.org/hornetq/2.2.2.Final/user-manual/en/html/send-guarantees.html#send-guarantees.nontrans.acks

                             

                             

                             

                            However, you understand that measuring non-sync performance of a single producer is a bit pointless, right?

                            • 11. Re: hornetQ message sending process
                              nareshpa

                              here I posted hornetq-configuration.xml and hornetq-jms.xml

                               

                              hornetq-configuration.xml


                              <configuration xmlns="urn:hornetq"

                                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                             xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

                               

                                 <connectors>

                                    <connector name="netty">

                                       <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>

                                       <param key="host"  value="localhost"/>

                                       <param key="port"  value="5445"/>

                                    </connector>

                                 </connectors>

                               

                                 <acceptors>

                                    <acceptor name="netty">

                                       <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>

                                       <param key="host"  value="localhost"/>

                                       <param key="port"  value="5445"/>

                                    </acceptor>

                                 </acceptors>

                               

                                 <security-settings>

                                    <security-setting match="#">

                                       <permission type="createTempQueue" roles="guest"/>

                                       <permission type="deleteTempQueue" roles="guest"/>

                                       <permission type="consume" roles="guest"/>

                                       <permission type="send" roles="guest"/>

                                    </security-setting>

                                 </security-settings>

                               

                                 <address-settings>

                                    <!--default for catch all-->

                                    <address-setting match="#">

                                       <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                       <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                       <redelivery-delay>0</redelivery-delay>

                                       <max-size-bytes>-1</max-size-bytes>

                                       <page-size-bytes>10485760</page-size-bytes>        

                                      <!-- <message-counter-history-day-limit>10</message-counter-history-day-limit> -->

                                    </address-setting>

                                 </address-settings>

                               

                                 <paging-directory>../data/paging</paging-directory>

                                 <bindings-directory>../data/bindings</bindings-directory>

                               

                                 <journal-sync-transactional>false</journal-sync-transactional>

                                 <journal-sync-non-transactional>false</journal-sync-non-transactional>

                                 <!--<journal-file-size>10485760</journal-file-size>

                                 <journal-type>ASYNCIO</journal-type>-->

                                 <journal-min-files>50</journal-min-files>

                                 <journal-directory>../data/journal</journal-directory>

                                 <large-messages-directory>../data/large-messages</large-messages-directory>

                               

                              </configuration>

                               

                              hornetq-jms.xml

                               

                              <configuration xmlns="urn:hornetq"

                                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                         xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">

                               

                               

                               

                                  <connection-factory name="NettyConnectionFactory">

                              <!--   <block-on-non-durable-send>false</block-on-non-durable-send>

                                  <block-on-durable-send>false</block-on-durable-send>

                                  <block-on-persistent-send>true</block-on-persistent-send>

                                  <block-on-non-persistent-send>true</block-on-non-persistent-send>

                                  <block-on-acknowledge>false</block-on-acknowledge>-->

                                     <connectors>

                                               <connector-ref connector-name="netty"/>

                                     </connectors>

                                      <entries>

                                          <entry name="ConnectionFactory"/>

                               

                                      </entries> 

                                   <!--   <use-global-pools>false</use-global-pools>

                                      <scheduled-thread-pool-max-size>5000</scheduled-thread-pool-max-size>

                                      <thread-pool-max-size>-1</thread-pool-max-size>  -->

                               

                                  </connection-factory>

                               

                                  <queue name="DLQ">

                                      <entry name="/queue/DLQ"/>

                                  </queue>

                                  <queue name="ExpiryQueue">

                                      <entry name="/queue/ExpiryQueue"/>

                                  </queue>  

                                  <queue name="ExampleQueue">

                                      <entry name="/queue/ExampleQueue"/>

                                  </queue>

                                  <topic name="ExampleTopic">

                                      <entry name="/topic/ExampleTopic"/>

                                  </topic>

                               

                                  <queue name="queue.internals.accounts">

                                      <entry name="queue.internals.accounts"/>

                                  </queue>

                               

                              </configuration>

                               

                               

                              actually here my problem is  one producer start sending messages 8000 per second that's fine, whenever second producer will be start sending messages to same queue first producer message count will be decreased around 4000 per second. I have to send messages from four producers to samequeue without decreasing message count means each producer maintain message count around 8000 per second once I will increase producer.