How to pass '{' in simple languge expression?

2014-02-21 Thread Mariusz
Hi,
I want to use somethig like this:

from("file:test?fileName=${bean:Utils.getFileName('file.dat.{0}.gz',
'DDmm')}").to(...)

Method is executed but there are passed 'null' parameters. Without {0}
method is working fine.

Please advise.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-pass-in-simple-languge-expression-tp5747738.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to pass '{' in simple languge expression?

2014-02-21 Thread Mariusz
Thanks for your ansewer. I'm using 2.12.2 version. As a workaround I have
just used '[0]' as placeholder as 'file.dat.[0].gz' string is retrieved from
properties file.

Mariusz



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-pass-in-simple-languge-expression-tp5747738p5747751.html
Sent from the Camel - Users mailing list archive at Nabble.com.


GenericFileOperationFailedException for file deletion

2013-09-14 Thread Mariusz
Hi,

I'm trying to use fileLock (, Camel 
2.12.0) for fileEndpoint but I'm getting following exception:

Error during commit. Exchange[text.txt]. Caused by: 
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot 
delete file: GenericFile[text.txt]]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
delete file: GenericFile[text.txt]
at 
org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy.commit(GenericFileDeleteProcessStrategy.java:81)
at 
org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:144)
at 
org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80)
at 
org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54)

It seems that it is not possible to delete file when LockFile is aquired. I 
see in code that in GenericFileDeleteProcessStrategy class file deletion is 
before:  exclusiveReadLockStrategy.releaseExclusiveReadLock(operations,
file, 
exchange);

Thanks,
Mariusz



--
View this message in context: 
http://camel.465427.n5.nabble.com/GenericFileOperationFailedException-for-file-deletion-tp5739382.html
Sent from the Camel - Users mailing list archive at Nabble.com.


readLock=fileLock causes GenericFileOperationFailedException on Windows

2013-09-15 Thread Mariusz
Hi,
When I'm trying do execute following simple route:





I'm getting:

Error during commit. Exchange[text.txt]. Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot
delete file: GenericFile[text.txt]]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
delete file: GenericFile[text.txt] at
org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy.commit(GenericFileDeleteProcessStrategy.java:81)
 

It is not working for 2.12.0, 2.11.1.  



--
View this message in context: 
http://camel.465427.n5.nabble.com/readLock-fileLock-causes-GenericFileOperationFailedException-on-Windows-tp5739402.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: GenericFileOperationFailedException for file deletion

2013-09-15 Thread Mariusz
Hi Claus,

I have created JIRA: https://issues.apache.org/jira/browse/CAMEL-6750



--
View this message in context: 
http://camel.465427.n5.nabble.com/GenericFileOperationFailedException-for-file-deletion-tp5739382p5739412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


JMSReplyTo improperly utilised by camel to send an incomplete message

2019-06-04 Thread Mariusz Kosecki
Hello,
My route is as follows:

from("jms:topic:T.INPUT?disableReplyTo=false")
.process(requestProcessor)
.unmarshal().json(JsonLibrary.Jackson, MyRequest.class)
.split(messageSplitter)
.process(restProcessor)
.unmarshal().json(JsonLibrary.Jackson, MyResponse.class)
.aggregate(messagesAggregator)
.process(responseProcessor)
.to("jms:topic:recipientTopic");

If I set disableReplyTo=true and convert JMSReplyTo into
CamelJmsDestinationName, I get the expected result: process the request and
send the response to the output topic.
But I cannot comprehend why would I need to disable reply to, when in fact
I want to utilise it.
Currently, when disableReplyTo is set to false, I will end up a gibberish
message on the output topic, which cannot be parsed and throws an exception
"ClassNotFoundException: (package name).MyRequest" - it seems that camel
utilises JMSReplyTo between the first unmarshal() and split(), which is
unwanted as the message processing is incomplete. Is this a bug? Is this
explicitly documented somewhere? Am I doing something wrong? Are there too
many steps in the route? Can anyone explain?

Kind regards.


MQTT to MQTT

2017-06-12 Thread Mariusz Koprowski
Hi All
I need to build a simple component that will take messages from one MQTT topic 
and republish it on other MQTT topic (from one broker to another broker). 
Messages are binary so I can't add anything to the body of the message.
The main questions are

  1.  how to effectively store topics mapping (can I use LeveDB?)
  2.  how to make it dynamic (e.g. can I put data dynamically to LevelDB and 
they will be used across all routes ?)

Example
Incoming messages comes on topics xx/xx/xx and in zz/zz/zz
All of the messages from both of that topics have to by published on topic 
yyy/yyy

Ther is no splitting of the topic so there will not be an example where on 
topic should go to two topics

Thanks for help


Best regards
--
Mariusz Koprowski