11 Replies Latest reply on Jan 7, 2009 6:23 AM by beve

    Doubt in DeadLetterService

      Hi All,
      I have doubts in DeadLetterService.

      1. When exception occurs in any action in action chain (say first action) one record is getting inserted in message table with classification = DLQ and delivered = true always even after setting org.jboss.soa.esb.messagestore.classification = RDLVR.

      2. Message is not getting redelivered even after setting org.jboss.soa.esb.deliver.isRedelivery = true.

      I am using jbossesb-server-4.4.GA.

      Please help...

        • 1. Re: Doubt in DeadLetterService

          I guess i didn't phrase my message properly or my query was not clear in my previous post.

          I simply wanted to know how can i configure my esb service so if any action in action pipeline throws exception during processing, message should be come to the first action of pipeline again till the max retry occurs.
          I think this is what “RedeliverService� do, but I am not able to achieve redelivery.

          Please help…

          • 2. Re: Doubt in DeadLetterService
            beve

            If you can use JMS as your transport this can be done by configuration. If this is the case then take a look at the jms_transacted quickstart which describes this.

            regards,

            /Daniel

            • 3. Re: Doubt in DeadLetterService

              Daniel thanks for reply,
              I am sending ESB message using "ServiceInvoker".
              Please let me know the behavior i had mentioned in first post in this topic is normal or there is some bug in "DeadLetterService".

              According to my understanding if during the processing of any action in action chain exception occurs and faultTo is not set message should go in "message" table with "RDLVR" classification. then "RedeliverService" will try to send the same message again and again until max try reached.

              But in my case always message is getting inserted with "DLQ" classification so "RedeliverService" is not fetching the message for redelivery since "RedeliverService" fetches only the message whose classification is "RDLVR"

              Please guide me...

              • 4. Re: Doubt in DeadLetterService
                kconner

                If you have a OneWay service with no FaultTo then the message will be stored with DLQ classification.

                If this is on the client (ServiceInvoker) and an async invocation fails then it will be stored with RDLVR classification and then retried.

                There are two types of pipeline faults, application and runtime. If a RuntimeException or Error is trapped when running a transactional pipeline then the encompassing transaction will be rolled back and redelivery can take place.

                If any other exception is caught then it is assumed to be an application exception and will be sent back to the caller's FaultTo EPR.

                The quickstart mentioned by Daniel is a good example of how to do this.

                Kev

                • 5. Re: Doubt in DeadLetterService

                  Thanks Kevin,
                  I have two questions here

                  1. Can we set dLQMaxResent per message basis? My requirement is to have different max tries for message of different priority and this information will be fatched from database.
                  Currently i am having this in configuration file jboss-esb.xml

                  <activation-config>
                   <!-- The maximum number of times a message is redelivered before it is sent to the DLQ -->
                   <property name="dLQMaxResent" value="5"/>
                  </activation-config>
                  


                  2. How can i configure delay between continuous retries, i can see the default delay is very low (less then second) i want to increase this and Where can i read about all possible attributes and properties of <activation-config> tag?

                  • 6. Re: Doubt in DeadLetterService
                    beve

                     

                    2. How can i configure delay between continuous retries, i can see the default delay is very low (less then second) i want to increase

                    Take a look at jbm-queue-service.xml in the jms_transacted quickstart for this setting. I've updated the readme.txt file now so that this is clear.

                    Where can i read about all possible attributes and properties of <activation-config> tag?

                    From readme.txt : For activation-config properties see : http://www.jboss.org/wiki/Wiki.jsp?page=ConfigJMSMessageListener


                    regards,

                    /Daniel

                    • 7. Re: Doubt in DeadLetterService

                      Thanks Daniel,
                      I did the same what you suggested but i seams it has no effect
                      below is my queue-service.xml

                      <?xml version="1.0" encoding="UTF-8"?>
                      <server>
                       <mbean code="org.jboss.jms.server.destination.QueueService"
                       name="src.com.service.destination:service=Queue,name=send_railbill_esb" xmbean-dd="xmdesc/Queue-xmbean.xml">
                       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                       <depends>jboss.messaging:service=PostOffice</depends>
                       </mbean>
                       <mbean code="org.jboss.jms.server.destination.QueueService"
                       name="src.com.service.destination:service=Queue,name=send_railbill_gw" xmbean-dd="xmdesc/Queue-xmbean.xml">
                       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                       <depends>jboss.messaging:service=PostOffice</depends>
                       <!-- redelivery attempt delay in millis -->
                       <attribute name="RedeliveryDelay">50000</attribute>
                       <attribute name="MaxDeliveryAttempts">4</attribute>
                       </mbean>
                      </server>
                      


                      Please let me know if i have made any mistake...

                      • 8. Re: Doubt in DeadLetterService
                        beve

                        Did you try changing this setting in the jms_transacted quickstart and this did not work? I've just tried this and it worked fine.

                        • 9. Re: Doubt in DeadLetterService

                          Its working fine in jms_transacted quick start.
                          While running this quice start i have observed few things
                          there is one error message in logger and in this logger deliveryId get incremented in each iterations.

                          15:06:00,218 ERROR [JmsServerSession] Unexpected error delivering message delega
                          tor->JBossMessage[327726]:PERSISTENT, deliveryId=4

                          But in my service this keeps constant and i observed there is no delay in resending while executing my service regardless

                           <attribute name="RedeliveryDelay">50000</attribute>
                           <attribute name="MaxDeliveryAttempts">4</attribute>
                          


                          Any clue...?



                          • 10. Re: Doubt in DeadLetterService

                            Daniel,
                            i got the problem, actually by mistake i was setting those properties for gateway bean. When i set the properties to esb bean it worked.

                            But not sure why the below error message occurs (which i had posted in previous post).

                            Still i didn't get answer of my first query of last to last post.

                            1. Can we set dLQMaxResent per message basis? My requirement is to have different max tries for message of different priority and this information will be fatched from database.
                            Currently i am having this in configuration file jboss-esb.xml

                            <activation-config>
                             <!-- The maximum number of times a message is redelivered before it is sent to the DLQ -->
                             <property name="dLQMaxResent" value="5"/>
                            </activation-config>
                            


                            Thanks for your help, i am really glad...

                            • 11. Re: Doubt in DeadLetterService
                              beve

                               

                              But not sure why the below error message occurs (which i had posted in previous post).

                              Do you mean this error message :
                              15:06:00,218 ERROR [JmsServerSession] Unexpected error delivering message delega
                              tor->JBossMessage[327726]:PERSISTENT, deliveryId=4

                              This is described in the readme.txt file for the jms_transacted quickstart, if that is the error you are referring to that is.

                              1. Can we set dLQMaxResent per message basis?

                              Not that I'm aware of. You might want to look at the Messaging user guide and see if there is any information there about doing something like this.

                              regards,

                              /Daniel