Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3485

Transacted Session returns invalid MessageConsumer after the first MessageConsumer for the same destiantion. Bug introduced in 5.5.0 - working ok in 4.1.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 5.5.0
    • None
    • JMS client
    • None

    Description

      When I have a transacted Session, as it is single threaded I can't create two MessageConsumer to the same Destination. But if I create a MessageConsumer to a Destination and then I close it, then I should be able to create a new MessageConsumer to the same Destination. This is working fine in active mq 4.1.2 but it doesn't work in 5.5.0. It allows to create a second MessageConsumer but that seconde MessageConsumer always returns null when the queue has messages.

      i.e:
      Session session = .... //transacted session
      Destination dest = ....
      MessageConsumer mc = session.createMessageConsumer(dest);
      Message message = mc.receive(); // message received ok
      mc.close();
      mc = session.createMessageConsumer(dest);
      Message message = mc.receive(); // message is null

      Thanks, Pablo.

      Attachments

        1. activemq-issue-test-case.zip
          63 kB
          Pablo La Greca

        Activity

          People

            dejanb Dejan Bosanac
            pablolagreca Pablo La Greca
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: