jgreffe created CAMEL-13884:
-------------------------------
Summary: 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.23.1, 2.21.2, 2.20.1
Reporter: jgreffe
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/TESB-26765/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 :
* 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.2#803003)