4 Replies Latest reply on Sep 13, 2010 2:51 AM by Hugh Bragg

    no messages being sent (mostly)

    Hugh Bragg Newbie

      My sender is blocked trying to send messages.

       

      This only seems to happen most of the time.

       

      I have used the default-standalone-non-clustered configuration.

       

      I've added several queues.

       

      I've changed the connector/acceptor definitions so that the producer connects on netty and the consumer connects on netty-public:

       

      <connectors>
            <connector name="netty">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
               <param key="host"  value="10.78.20.20"/>
               <param key="port"  value="5455"/>
            </connector>
           
            <connector name="netty-public">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
               <param key="host"  value="10.78.20.20"/>
               <param key="port"  value="5445"/>
            </connector>
         </connectors>

       

         <acceptors>
            <acceptor name="netty">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
               <param key="host"  value="10.78.20.20"/>
               <param key="port"  value="5455"/>
            </acceptor>
           
            <acceptor name="netty-public">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
               <param key="host"  value="10.78.20.20"/>
               <param key="port"  value="5445"/>
            </acceptor>
         </acceptors>

       

       

       

      I've added some address specification to enable paging:

       

      <address-settings>
            <!-- default for agility -->
            <address-setting match="agility.#">
               <max-size-bytes>104857600</max-size-bytes>
               <page-size-bytes>10485760</page-size-bytes>
               <address-full-policy>PAGE</address-full-policy>
            </address-setting>
            <!--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>10485760</max-size-bytes>      
               <message-counter-history-day-limit>10</message-counter-history-day-limit>
               <address-full-policy>BLOCK</address-full-policy>
            </address-setting>
         </address-settings>

       

       

      sometimes, messages flow through without a problem, but most of the time it's stuck. I have no idea what might be causing it.

       

      I've attached the producer code.

       

      Why is the producer hanging?

       

      Any ideas what to do?

       

      I've been trying to get this working for days now and it always ends up blocked.

        • 1. Re: no messages being sent (mostly)
          Hugh Bragg Newbie

          This is my jms config

           

          <connection-factory name="NettyConnectionFactory">
                 <connectors>
                   <connector-ref connector-name="netty"/>
                 </connectors>
                  <entries>
                      <entry name="/ConnectionFactory"/>
                  </entries>
              </connection-factory>
             
              <connection-factory name="NettyPublicConnectionFactory">
                 <connectors>
                   <connector-ref connector-name="netty-public"/>
                 </connectors>
                  <entries>
                      <entry name="/PublicConnectionFactory"/>
                  </entries>
              </connection-factory>
             
             
              <queue name="agility.euroz.shares.uat">
                  <entry name="/queue/agility.euroz.shares.uat"/>
              </queue>
              <queue name="agility.euroz.dca.uat">
                  <entry name="/queue/agility.euroz.dca.uat"/>
              </queue>
              <queue name="agility.wilsons.agility.shares.uat">
                  <entry name="/queue/agility.wilsons.agility.shares.uat"/>
              </queue>
             
              <queue name="agility.wilsons.agility.dca.uat">
                  <entry name="/queue/agility.wilsons.agility.dca.uat"/>
              </queue>
              <queue name="agility.wilsons.taten.shares.uat">
                  <entry name="/queue/agility.wilsons.taten.shares.uat"/>
              </queue>
              <queue name="agility.wilsons.taten.dca.uat">
                  <entry name="/queue/agility.wilsons.taten.dca.uat"/>
              </queue>

          • 2. Re: no messages being sent (mostly)
            Tim Fox Master

            Ouch, you're creating a new Producer for each message, that's an anti-pattern and is going to be really slow.

            • 3. Re: no messages being sent (mostly)
              Hugh Bragg Newbie

              A very good point, thanks. I'll fix that. I've inherited this code and I've been trying to port from JBossMQ. The guy who wrote it is a VB.Net programmer. You should see the mess they made with the sockets.

              Anyway, that doesn't answer my question. I'm going to try a different address selector. I think I I will try "jms.queue" in front of what I already have. I'll et you know if it works.

              • 4. Re: no messages being sent (mostly)
                Hugh Bragg Newbie

                I still think this is the address selector, but I can't tell because I can't access my running queues from the jmx console.

                The reason is that they are running as a windows service and the jmx console isn't accessible

                I posted another question related to this and I'm working on a better way to initiate the service with the provided service user account.