You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2019/10/24 06:22:00 UTC

[jira] [Commented] (CAMEL-13884) JMS, transacted=true and multiple messages

    [ https://issues.apache.org/jira/browse/CAMEL-13884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16958575#comment-16958575 ] 

Jean-Baptiste Onofré commented on CAMEL-13884:
----------------------------------------------

What ACK mode are you using ? And do you use XA ?

> JMS, transacted=true and multiple messages
> ------------------------------------------
>
>                 Key: CAMEL-13884
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13884
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 2.20.1, 2.21.2, 2.23.1
>            Reporter: jgreffe
>            Priority: Major
>         Attachments: Transacted.zip
>
>
> Hello,
> seems there's an issue with Camel JMS :
>  # one producer poll files from a directory and send to an ActiveMQ subject
>  # one consumer reads messages in a non transacted way
>  # 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 :
> {code:java}
>  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 {code}
>  
> We should have another log :
> {code:java}
>  WARN | Received transacted: aFile2.txt{code}
>  
> 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!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)