5 Replies Latest reply on Jul 6, 2010 4:53 PM by Tim Fox

    Issue with Duplicate Message Detection

    Bijith Kumar Master

      Hi,

       

      I am trying to use the Duplicate Message Detection feature in HornetQ. To enable this feature, I have set the duplicate detection id for each message as shown below

       

      m.setStringProperty(org.hornetq.core.message.impl.MessageInternal.HDR_DUPLICATE_DETECTION_ID.toString(), UUID.randomUUID().toString());

       

      Now, when I send 50000 messages to a queue, and receives them, I get only 1028 messages. From JConsole, I could see that only 1028 messages were added to queue and there are no messages left in queue. So it seems, somehow server rejected all messages after 1028th.

      It works when I remove the duplicate detection key from message.

       

      Also, I tested this by setting simple numbers as the HDR_DUPLICATE_DETECTION_ID instead of UUID (i.e. 1-50000) . It didn't work either. However, this time I was able to receive 1055 messages. So I assume this has something to do with the size of the message.

       

      Attached is the HornetQ configuration files I used. Following are my memory settings

      <max-size-bytes>5242880</max-size-bytes>
      <page-size-bytes>1048576</page-size-bytes>  

       

      Am I doing something wrong here? Any help on this is highly apreciated.

       

      Thanks

      Bijith