Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2880

jms:* commands don't consume messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 2.4.0, 3.0.1, 2.3.5, 4.0.0.M3
    • karaf
    • None
    • Windows 7 Professional, Karaf launched as command line

    Description

      I 've downloaded Karaf 3.0.0, deployed it and setup a basic configuration.

      I have created few jms connection factories targetting activemq instances in remote locations (France to Germany).

      All commands works in nominal scenarios except jms:consume & jms:move, and potentially each command consuming messages.

      I had a look at the code and I think the problem resides in the use of receiveNoWait in the class org.apache.karaf.jms.internal.JmsServiceImpl.
      message = consumer.receiveNoWait(); // present in move(...) && consume(...) comands

      Indeed, I have already experienced situations where messages can't be completely prefetched to the jms client internal queue between the call to connection.start(); and the call to receiveNoWait().
      A blocking call with a timeout would correct, by default 5 seconds could be ok in my opinion. Let's say:
      message = consumer.receive(5000L);

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            eurofagl Alexandre Gallice
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: