EJB deployed on WebLogic reads and processes messages from queues, but they don't disappear

20 Views Asked by At

I'm facing an issue with an EJB that I have deployed on WebLogic. This EJB consumes messages from some queues. While the message is being read and processed correctly by my application, it does not disappear from the queue as expected.

Here's a brief description of the situation:

  • I do not have admin rights to manage or directly inspect the queues.

  • My understanding is that once the EJB processes the message, it should be removed from the queue.

  • The processing logic within the EJB seems to be working as expected, and I haven't encountered any exceptions or error messages in the logs.

Is there anyone who has faced a similar issue or has any insights on why this might be happening? I'm looking for any suggestions or troubleshooting steps that might help me identify and solve this problem.

My EJB:

@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "acknowledgeMode",
                                                              propertyValue = "Auto-acknowledge"),
                                    @ActivationConfigProperty(propertyName = "destinationType",
                                                              propertyValue = "javax.jms.Queue") },
               mappedName = "java:comp/env/cola")
public class ConsumerMessageListener implements MessageListener {

  private static final Logger LOGGER = Logger.getLogger(ConsumerMessageListener.class);

  /**
   * Default constructor. Siempre hay que suministrar un constructor por defecto en un MDB.
   */
  public ConsumerMessageListener() {
    // Constructor por defecto
  }

  /**
   * onMessage
   *
   * Metodo que es llamado cuando se recibe un mensaje desde el JMS tipo TOPIC.
   *
   */
  public void onMessage(Message message) {

    try {
      LOGGER.debug("Procesando mensaje " + message.toString());
      TextMessage tm = (TextMessage) message;
      String text = tm.getText();
      

      LOGGER.info("END MESSAGE: " + text);

    } catch (Exception ex) {
      LOGGER.error("An exception occurred: " + ex.getMessage());
      LOGGER.error("Error: Listener: " + ex.getCause());
    }

  }

}

Thank you in advance for your help!

0

There are 0 best solutions below