1 2 3 Previous Next 36 Replies Latest reply on Feb 15, 2010 12:22 PM by clebert.suconic Go to original post
      • 30. Re: MDB Client for HornetQ Embedded with Core

        I have the testcase files in Zip along with this message.

         

        The same participant classes, except SessionPool and PoolFactory are added for SessionPooling with Transact Sessions

         

        MessageSendAndReceive

         

        The entry class which start the HornetQ emebedded server and starts the message pushing (MessagePusher) or Message receiving (MessageReciver) or do both.

         

        MessagePusher

         

        This class starts a executor framework to send messages parallely.

        OrigSender.java implements Runnable

        This does original job of sending the message by creating the producer.

         

         

        MessageReceiver.java

        This classes created multiple consumers and assings and MessageHandler for each and every consumer

         

        MsgHandler implements MessageHandler

        MessageHandler with onMessage method.

         

        Please let me know if you need anything else.

        • 31. Re: MDB Client for HornetQ Embedded with Core
          Any updates ??
          • 32. Re: MDB Client for HornetQ Embedded with Core
            timfox

            vijayamaladoss wrote:

             

            Any updates ??

            Please be more patient.

             

            The team are very busy with other tasks. We'll get around to looking at what's wrong in your config/program in due course

             

            By then, you might have already figured out what's wrong with it...

            • 33. Re: MDB Client for HornetQ Embedded with Core
              clebert.suconic

              From what I understand, you still have the main entry (#) at the configuration, what will have precedence of your default.

               

               

              Try using a real matching (to queue.# if you like) to your address, and it should work.

               

               

              Take a look on how the wildcard-syntax will work:

               

              http://hornetq.sourceforge.net/docs/hornetq-2.0.0.GA/user-manual/en/html/wildcard-syntax.html

              • 34. Re: MDB Client for HornetQ Embedded with Core
                clebert.suconic

                Actually you're not using the configuration file. I misunderstood that.

                 

                But you need at least one match on the Settings for the default to work.

                 

                This structure always need at least one Item on the matching, and the default will merge the other information.

                 

                You should be able to mimic what's on the config:

                 

                 

                          AddressSettings settings = new AddressSettings();
                          settings.setDeadLetterAddress(new SimpleString("queue.DLQ"));
                          settings.setMaxDeliveryAttempts(3);
                          server.getAddressSettingsRepository().setDefault(settings);
                          server.getAddressSettingsRepository()
                          server.getAddressSettingsRepository().addMatch("#",settings);
                
                
                
                • 35. Re: MDB Client for HornetQ Embedded with Core
                  I tried this addMatch, but that doesnt work. The message is keep on retried on loop for forever . I even created new queue and DLQ to apply the settings.
                  • 36. Re: MDB Client for HornetQ Embedded with Core
                    clebert.suconic

                    I have attached an example you could use. It was based on the EmbeddedExample. You can just replace it by this one attached and it should work.

                     

                     

                    When using the core, you always need to acknowledge your messages. I suspect you were not doing so.

                     

                    If you look at the example, I always ack the message, and the rollback should increase the message received counter what will kick the DLA transfer.

                    1 2 3 Previous Next