Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13884

JMS, transacted=true and multiple messages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.20.1, 2.21.2, 2.23.1
    • Fix Version/s: None
    • Component/s: camel-jms
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Hello,

      seems there's an issue with Camel JMS :

      1. one producer poll files from a directory and send to an ActiveMQ subject
      2. one consumer reads messages in a non transacted way
      3. one consumer reads messages in a transacted way

      2. reads all messages correctly

      3. doesn't read all messages

       

      Attached is a Maven project, with a Transacted main.

      The output will be :

       INFO | Apache Camel 2.20.1 (CamelContext: camel-1) is starting
       INFO | JMX is enabled
       INFO | Type converters loaded (core: 192, classpath: 4)
       INFO | StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
       INFO | Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
       INFO | Using default memory based idempotent repository with cache max size: 1000
       INFO | Route: globalTest_cFile_1 started and consuming from: file://C:/tmp/in?autoCreate=true&bufferSize=128&flatten=false&noop=true
       INFO | Route: globalTest_cJMS_2 started and consuming from: cMQConnectionFactory1://topic:topic1?transacted=true
       INFO | Route: globalTest_cJMS_3 started and consuming from: cMQConnectionFactory1://topic:topic1
       INFO | Total 3 routes, of which 3 are started
       INFO | Apache Camel 2.20.1 (CamelContext: camel-1) started in 0.656 seconds
       WARN | Producing: aFile1.txt
       WARN | Received non transacted: aFile1.txt
       WARN | Received transacted: aFile1.txt
       WARN | Producing: aFile2.txt
       WARN | Received non transacted: aFile2.txt 

       

      We should have another log :

       WARN | Received transacted: aFile2.txt

       

      To reproduce :

      • run ActiveMQ
      • import Transacted.zip in an IDE
      • update the Transacted.filesDirectory to a directory
      • fill 2 files in this directory
      • execute the main method

       

      Thanks!

        Attachments

        1. Transacted.zip
          7 kB
          jgreffe

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jgreffe@yahoo.fr jgreffe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: