2 Replies Latest reply on Dec 12, 2017 5:15 AM by kavinthamaduranga

    Avoid adding known messages to DLQ when exception thrown and keep in queue

    kavinthamaduranga

      hi, following is my mdb annotations and i'm using jboss EAP 7

       

      @MessageDriven(name = "ConnectPublish_upp", activationConfig = {

          @javax.ejb.ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "topic/L_upp"),

          @javax.ejb.ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

          @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue="topic/L_upp"),

          @javax.ejb.ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue="Durable"),

          @javax.ejb.ActivationConfigProperty(propertyName = "subscriptionName", propertyValue="lUpp"),

          @javax.ejb.ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })

       

      So when a RunTimeException occur in "onMessage" , message will be added to DLQ as default behavior. how to avoid that keep the queue grow?