1 Reply Latest reply on Mar 22, 2012 7:41 PM by Clebert Suconic

    Duplicate Messages are encountered even if duplicate messages detected by Hornetq

    Hushen Savani Novice

      Hi Community,

       

           I am using Hornetq-2.2.10. I have configured HA for hornetq server. When fail-over occurs, and processing is switched to backup server, at that time messages are duplicated. Following are my observations:

       

           1) Even though setting use-duplicate-detection to true in cluster connection, it does not set HDR_DUPLICATE_DETECTION_ID in message property.

           2) Hence, I've set  HDR_DUPLICATE_DETECTION_ID manually in code.

           3) After setting HDR_DUPLICATE_DETECTION_ID in code, the server detects the duplicate messages. Following log suggests the same :

                   

       HornetQException[errorCode=113 message=Duplicate message detected - message will not be routed. Message information:ServerMessage[messageID=2147488066,priority=1, bodySize=2655,expiration=0, durable=true, address=jms.queue.primary.mocmProcessingQueue,properties=TypedProperties[{_HQ_DUPL_ID=70160045}]]@1956077975]
      

       

           4) But, it does not detect all the duplicate messages and filter it. At the very end of processing, I always get more than 10 Duplicate Messages out of 8000 Messages.

           5) I use transacted session in my client.

           6) I audit my messages in database on onMessage() of my MDB in order to check the duplication.

       

           Pl. suggest some pointers on the same.

       

           PFA Server Config and client code.

       

           Thanks.

       

      Best Regards,

      Hushen Savani