Re: Rabbitmq URI

2016-12-06 Thread souciance
I can send you samples  once I am at work.

Den 7 dec. 2016 2:00 fm skrev "kaiser75 [via Camel]" <
ml-node+s465427n5791163...@n5.nabble.com>:

> Is there a place where I can find some URI samples for RMQ.  How are the
> options passed and the delimiters
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Rabbitmq-URI-tp5791070p5791163.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Rabbitmq-URI-tp5791070p5791167.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Camel SQL as delta consumer

2016-12-06 Thread contactreji
Hi gusy

I was wondering if camel consumer endpoint has capability to pull out the
delta changes which happen on the tables?

Ex - Retrieve all those rows changed since last poll without referring on
any timestamp column.

Regards
Reji



-
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & 
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-SQL-as-delta-consumer-tp5791166.html
Sent from the Camel - Users mailing list archive at Nabble.com.


ERROR When unloading a WAR (wildfly 9.x)

2016-12-06 Thread chandler
I run a  Camel JMS Request Reply   
in my routes works great. I believe responses go to a temp queue via 
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer

 
.

My sending//to/  URL is :
activemq:queue:myQueue?jmsMessageType=Text&replyToType=Temporary&concurrentConsumers=1

When I unload/un-deploy the WAR (which contains the camel route jms
request/reply) I get (every 5 seconds):  

/*17:43:15,336 ERROR
[org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel
(p6pmtjsonresponse) thread #2 - TemporaryQueueReplyManager[request]) Could
not refresh JMS Connection for destination 'temporary' - retrying using
FixedBackOff{interval=5000, currentAttempts=5, maxAttempts=unlimited}.
Cause: null
17:43:15,343 ERROR
[org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel
(p6pmtjsonresponse) thread #4 - TemporaryQueueReplyManager[Request]) Could
not refresh JMS Connection for destination 'temporary' - retrying using
FixedBackOff{interval=5000, currentAttempts=5, maxAttempts=unlimited}.
Cause: null*/

Seems like (?)
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer is still
running and trying to reconnect to the TemporaryQueueReply? 

Is the away to get kill/stop
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer when the
/WAR/ is unloaded?  



--
View this message in context: 
http://camel.465427.n5.nabble.com/ERROR-When-unloading-a-WAR-wildfly-9-x-tp5791164.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: XSLT transformation Base64binary and camel xslt

2016-12-06 Thread ravi21588
Hi,

The document generation system is not directly exposed for consuming in
internet.

We have custom library classes which we invoke and it return the document as
byte[].

once i get the response as byte array,i need to create an xml with just a
root element pdf-data.

I am assuming that if i define pdf-data as type="xs:base64binary" i can
place the binary content in xml



%PDF-1.4
%
5 0 obj
<<
/Length 6 0 R
/Filter /FlateDecode
>>
stream
x??}K?m?m?\?BC?J>??Y??]??S?M?4IG?l???<}6H~?\k?Ew?$?
}?}???7??^뿿kq/???|?W?~??i????ο?z_?[??+
?r??O?
]?/?c??
pv/ ??P????U?????@[{9?p?9A?w???N????r???c}?? ??
???n?P#??h>?mc???j?/6?Ecc???{u=?? z?L?A??L???
?H??O?Z?HXo?L?`?0??u?
???kX)??????Aꀤ~??_`???TM6'?~??Q?KrQ??x??c=?%??'q??????;??n$2D??{ဃr;??e?;uL*???
q??
o$.?????Uv
?/?G?%*?J"G?c??&?:?@,?'?+M?Q?E?a??R,H?g?_?H??`??X"?_#?A???vgH9LXlL9A?:+
?:]?
S?=?(?m;R???%
??I?t???XNm_??m/L?t??"??[G&?7?/?@?y??5?s??~?~5uK?wO???b?M?i??q
?a\?~nH7?=?S


Kindly let me know if doesn't make sense.




--
View this message in context: 
http://camel.465427.n5.nabble.com/XSLT-transformation-Base64binary-and-camel-xslt-tp5791061p5791161.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CXF - unmarshal error due to special characters

2016-12-06 Thread JamesG
Hi,

I've some CXF services with the following abilities:
a)  Retrieve from database via JDBC
b)  Retrieve from another system via TCP (netty)

I build the corresponding response java object and let Camel
perform the unmarshalling, in which after that CXF would
return the SOAP response to the caller. Everything works fine
until I encountered some non-unicode data from both
of the channels (database and TCP response).

CXF not able to unmarshal this and end up failing.
I did some research and found things like filterNonXmlChars 
property with JaxbDataFormat. But I'm just using CXF,
not Jaxb directly.

Any advises for me to move forward?


Thanks.





--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-unmarshal-error-due-to-special-characters-tp5791160.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: What to do with Null Body messages?

2016-12-06 Thread Claus Ibsen
Or use a filter eip
http://camel.apache.org/message-filter.html

You can also general use an intercept from and then detour / stop it if its null
http://camel.apache.org/intercept.html

On Tue, Dec 6, 2016 at 4:22 PM, Steve Huston  wrote:
> You can set the ROUTE_STOP property to true.
> http://camel.apache.org/intercept.html has more info.
>> -Original Message-
>> From: sa_james [mailto:sa_remin...@hotmail.com]
>> Sent: Tuesday, December 06, 2016 10:01 AM
>> To: users@camel.apache.org
>> Subject: What to do with Null Body messages?
>>
>> I have a processing Pipeline where I sometimes receive  null-Body Messages.
>> When I Forward the Messages to the next steps, there is an error. How do I
>> get rid of the null-Body exchanges? I mean, they have to go somewhere.
>> Thx.
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/What-to-
>> do-with-Null-Body-messages-tp5791139.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


RE: What to do with Null Body messages?

2016-12-06 Thread Steve Huston
You can set the ROUTE_STOP property to true.
http://camel.apache.org/intercept.html has more info.
> -Original Message-
> From: sa_james [mailto:sa_remin...@hotmail.com]
> Sent: Tuesday, December 06, 2016 10:01 AM
> To: users@camel.apache.org
> Subject: What to do with Null Body messages?
> 
> I have a processing Pipeline where I sometimes receive  null-Body Messages.
> When I Forward the Messages to the next steps, there is an error. How do I
> get rid of the null-Body exchanges? I mean, they have to go somewhere.
> Thx.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/What-to-
> do-with-Null-Body-messages-tp5791139.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


What to do with Null Body messages?

2016-12-06 Thread sa_james
I have a processing Pipeline where I sometimes receive  null-Body Messages.
When I Forward the Messages to the next steps, there is an error. How do I
get rid of the null-Body exchanges? I mean, they have to go somewhere.
Thx. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/What-to-do-with-Null-Body-messages-tp5791139.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: receiving with template and sending to the next processing stage

2016-12-06 Thread Steve Huston
You could create a separate Exchange for each message taken from the queue and 
use a producer template to send them. 
http://camel.apache.org/producertemplate.html

-Steve

> -Original Message-
> From: sa_james [mailto:sa_remin...@hotmail.com]
> Sent: Tuesday, December 06, 2016 9:55 AM
> To: users@camel.apache.org
> Subject: receiving with template and sending to the next processing stage
> 
> I am polling a Queue from time to time with a timer and consuming it with a
> template. I want to empty the Queue when it is time so I use a Loop. How do
> I send every single message from my receiveBody to the next processor as I
> am Looping to empty the Queue?
> Thx.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/receiving-
> with-template-and-sending-to-the-next-processing-stage-tp5791137.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


receiving with template and sending to the next processing stage

2016-12-06 Thread sa_james
I am polling a Queue from time to time with a timer and consuming it with a
template. I want to empty the Queue when it is time so I use a Loop. How do
I send every single message from my receiveBody to the next processor as I
am Looping to empty the Queue?
Thx.



--
View this message in context: 
http://camel.465427.n5.nabble.com/receiving-with-template-and-sending-to-the-next-processing-stage-tp5791137.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Saxon and root tag matching

2016-12-06 Thread richardgroote
Hello,

When adding a  after the
spring-ws call than the response is fine. The response of the spring
webservice call is DomSource (SAAJMessageFactory is used).


Kind regards,

Richard



--
View this message in context: 
http://camel.465427.n5.nabble.com/Saxon-and-root-tag-matching-tp5791134p5791135.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Saxon and root tag matching

2016-12-06 Thread richardgroote
Hello,

I've a question about using saxon and xslt within Apache Camel. Below is the
simplified camel configuration we're uising. The mock service returns some
XML.

When using the below xslt part than the result after the xslt is the
response of the mock service without the xml elements (namespaces are
declared).
out

When using the below xslt part (matching the root tag and declaring the
namespace) than the response is as expected.
out

When using a tool (XMLSpear or java client) matching on the '/' works. Does
anyone have a clue why this is not working?




http://localhost:8088/mockHttpBinding?timeout=1"; />



Kind regards,

Richard



--
View this message in context: 
http://camel.465427.n5.nabble.com/Saxon-and-root-tag-matching-tp5791134.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: XSLT transformation Base64binary and camel xslt

2016-12-06 Thread Siano, Stephan
Hi,

The statement that you generate the document as a byte array is not sufficient, 
it essentially means that you have some binary data. If you want to create 
Base64 encoded data from it, you can use the Base64 data format, but for XML 
you will probably need some information about the content and format of your 
binary data. XSLT usually cannot process arbitrary binary data unless it 
happens to be a binary representation of an XML document.

In order to build a working scenario you might also want to know the 
communication protocol between the document generation system and the Camel 
pipeline (maybe the document generation system puts a file somewhere in the 
filesystem, or it creates an HTTP request (and expects an appropriate 
response). You will also need to know the expected response format.

Best regards
Stephan

-Original Message-
From: ravi21588 [mailto:ravi21...@gmail.com] 
Sent: Montag, 5. Dezember 2016 16:17
To: users@camel.apache.org
Subject: XSLT transformation Base64binary and camel xslt

Hi All,

We have an integration to generate the document from document generation system.
The Document generation system returns document as bytes of array.
While creating response i need to create an xml  along with attachment type as 
an element with type base64binary.
Can you please tell me how can i acheive it.





--
View this message in context: 
http://camel.465427.n5.nabble.com/XSLT-transformation-Base64binary-and-camel-xslt-tp5791061.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Best way to build a wait/retry loop with Camel?

2016-12-06 Thread Joseph Kampf
If you store the messages in a DB, you can use the SQL component to drive your 
route.

You can craft your DB record to include a timestamp and have your SQL component 
use a relative time query so that once the record reaches the time you want it 
processed you can kick off your route.

Don’t forget to use the Idempotent consumer.  This is key when using the SQL 
component in an HA scenarios.

Joe




On 11/8/16, 11:24 AM, "Stephan Burkard"  wrote:

>@Brad: OK I guess that would work. But it's quite an implementation
>compared to the simple AMQ scheduler ;-)
>
>@James: Great question. I will definitely think about this. Have you got a
>generic approach to save/restore the message body and headers to/from the
>database?
>
>@Quinn: That's not a big issue in my case since the delay is 24 hours or
>less. The messages are currently in the queue, so the kaha-db-files cannot
>be deleted anyway.
>
>Once again thanks a lot for all your great answers!
>Stephan
>
>
>Quinn Stevenson  schrieb am Fr., 4. Nov. 2016
>um 17:48 Uhr:
>
>> James brings up a very good point.
>>
>> I know ActiveMQ isn’t designed for long-term messages, and it’s bit me a
>> couple of times with KahaDB.  What happened was I had quite a few old
>> messages, but they were spaced out over time.  KahaDB doesn’t compact
>> files, and it can’t delete files until all the messages in the files are
>> processed.  Long story short - we ran out of disk.
>>
>> We addressed this part by using mKahaDB - it didn’t really “fix” the
>> problem, but the nature of our messaging is such that we could live with it.
>>
>> > On Nov 4, 2016, at 10:34 AM, James Green 
>> wrote:
>> >
>> > Are you unable to move the messages into a database for "long-term"
>> > storage? That's what we do, and we simply scan for messages due to be
>> > "re-sent" and re-submit them back into the queue.
>> >
>> > I do not believe ActiveMQ was really intended to hold many messages for
>> > long term storage, hence we use something that was.
>> >
>> >
>> > On 3 November 2016 at 15:46, Stephan Burkard  wrote:
>> >
>> >> Hi Camel users
>> >>
>> >> TLDR:
>> >> - how to implement wait/retry loop?
>> >> - messages "wait" in a queue
>> >> - each message should be reprocessed only once per interval (let's say
>> per
>> >> day)
>> >> - after reprocessing a message either returns to the waiting queue or
>> >> continues (goes out of loop)
>> >> - after [maxRetry] attempts it is moved away (goes out of loop)
>> >>
>> >>
>> >> Full story:
>> >>
>> >> As part of a typical processing workflow, I have a queue with "waiting"
>> >> messages. These messages are waiting for data of another system and I
>> have
>> >> no idea when the data arrives. Therefore I want to reprocess the
>> messages
>> >> in an interval, let's say once a day. If the data is still missing,
>> they go
>> >> again to the waiting queue.
>> >> To move messages away that would wait forever, I set and check a
>> maxRetry.
>> >>
>> >> How would I best implement this? Some thoughts I made:
>> >>
>> >> 1. Just throw an exception if the data is missing. The message is
>> >> redelivered.
>> >>   Problem: The message is instantly redelivered. So it does the retries
>> >> within milliseconds. I cannot customize the interval.
>> >>
>> >> 2. Use the Camel delayer.
>> >>   Works good in general (my current solution). I can even calculate the
>> >> delay based on the JMSTimestamp to take into account the time a message
>> >> waits to be consumed.
>> >>   Problem: For an interval of 1 day, a message is permanently in
>> >> processing state. The consumer is blocked. When I shutdown the
>> container,
>> >> Camel waits 5 minutes and after restarting the message goes to the DLQ.
>> >>
>> >> 3. Use a CronScheduledRoutePolicy to start/stop the route in the given
>> >> interval.
>> >>   Problem: When I start the route once a day for 5 minutes, the messages
>> >> with missing data are circulating until the route is stopped again. So
>> they
>> >> try to find the data multiple times per second and instantly reach the
>> >> maxRetry. They must try only once per interval.
>> >>
>> >> 4. Use a JMS selector as from-Endpoint that selects "JMSTimestamp <
>> >> (currentTime - intervalTime)"
>> >>   Problem: The from-Endpoint URI seems to be a constant, I can't make
>> the
>> >> selector dynamic.
>> >>
>> >> 5. Use the Camel Throttler
>> >>   Problem: The throttler sets a bandwith, that is not what we need.
>> >>
>> >> 6. Use a Timer from-Endpoint and hand over to a bean that consumes the
>> >> messages (newest idea, not yet tried).
>> >>   I guess I could manage to consume all waiting messages just once (even
>> >> if they already return before I am finished).
>> >>   Problems I can think of: It is not very nice to build another JMS
>> >> consumer (beside Camel), but I could use Spring JMS Template.
>> >>
>> >>
>> >> Numbers 1, 3, 4 and 5 simply do not work (or I don't use them the right
>> >> way) for this case. Number 2 is my current solution, number 6 a new
>> idea.
>

Issue with Rest DSL, Jetty and Basic authentication

2016-12-06 Thread Remco Schoen
Hi, 


I'm trying to create an API with Rest DSL and Swagger Java components. For 
hosting the API I want to use Jetty and use Basic Authentication to secure it.

With Jetty 8 the code below works, but with Camel 2.18.1 my code fails in Jetty 
9 with this error:
No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator

It seems that when the security handler is re-added for the api-docs, the 
loginService is gone and can not be found anymore in the beans store of the 
server. I see in Jetty configuration examples that the loginService is also 
added as a bean to the Jetty server. If it has been added, it can be found when 
re-adding the security handler.

How can I solve this error?

Kind regards,

Remco Schoen


camel-context.xml:


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="
 http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
 http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd";>

  



  

  


  

  

  

  

  


  


  

  http://camel.apache.org/schema/spring";>

  
  
  
  
  
  



  

  
SUCCESS
  

  


  



HardcodedLoginService.java

package com.mooreds.camel.security;

import org.eclipse.jetty.security.DefaultIdentityService;
import org.eclipse.jetty.security.IdentityService;
import org.eclipse.jetty.security.LoginService;
import org.eclipse.jetty.security.MappedLoginService;
import org.eclipse.jetty.server.UserIdentity;
import org.eclipse.jetty.util.security.Credential;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.security.auth.Subject;
import java.security.Principal;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class HardcodedLoginService implements LoginService {
private final static Logger log = 
LoggerFactory.getLogger(HardcodedLoginService.class);

private final Map users = new ConcurrentHashMap();

// matches what is in the constraint object in the spring config
private final String[] ACCESS_ROLE = new String[] { "rolename" };

private IdentityService identityService = new DefaultIdentityService();

public IdentityService getIdentityService() {
return identityService;
}

public String getName() {
return "";
}

public UserIdentity login(String username, Object creds) {

UserIdentity user = null;

// HERE IS THE HARDCODING
boolean validUser = "ralph".equals(username) && 
"s3cr3t".equals(creds);
if (validUser) {
Credential credential = (creds instanceof 
Credential)?(Credential)creds:Credential.getCredential(creds.toString());

Principal userPrincipal = new 
MappedLoginService.KnownUser(username,credential);
Subject subject = new Subject();
subject.getPrincipals().add(userPrincipal);
subject.getPrivateCredentials().add(creds);
subject.setReadOnly();
user=identityService.newUserIdentity(subject,userPrincipal, 
ACCESS_ROLE);
users.put(user.getUserPrincipal().getName(), true);
}

return (user != null) ? user : null;
}

public void logout(UserIdentity arg0) {

}

public void setIdentityService(IdentityService arg0) {
 this.identityService = arg0;

}

public boolean validate(UserIdentity user) {
if (users.containsKey(user.getUserPrincipal().getName()))
return true;

return false;   
}
}

log:

2016-12-06 13:41:52,681 [main   ] INFO  ClassPathXmlApplicationContext 
- Refreshing 
org.springframework.context.support.ClassPathXmlApplicationContext@2a3046da: 
startup date [Tue Dec 06 13:41:52 CET 2016]; root of context hierarchy
2016-12-06 13:41:52,745 [main   ] INFO  XmlBeanDefinitionReader
- Loading XML bean definitions from file 
[/Users/remcos/topdesk/customer/jetty_basic_authentication/build/resources/main/META-INF/spring/camel-context.xml]
2016-12-06 13:41:54,653 [main   ] INFO  log
- Logging initialized @2496ms
2016-12-06 13:41:55,725 [main   ] INFO  DefaultTypeConverter   
- Loaded 197 type converters
2016-12-06 13:41:55,765 [main   ] INFO  SpringCamelContext 
- Apache Camel 2.18.1 (CamelContext: camel-1) is starting
2016-12-06 13:41:55,767 [main   ] INFO  ManagedManagementStrategy  
- JMX is enabled
2016-12-06 13:41:56,102 [main   ] INFO  DefaultRuntimeEndpoint

Re: Rabbitmq URI

2016-12-06 Thread kaiser75
apparently there is no way to explicitly specify the queue name in the URI.
So I just mapped my exchange and the queues as direct and that worked, but
i'd to create 3 excahnges and map them to each Queue , i'll try the topic
mode and the routing key to route and see that way i just need one exchange.






--
View this message in context: 
http://camel.465427.n5.nabble.com/Rabbitmq-URI-tp5791070p5791096.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Rabbitmq URI

2016-12-06 Thread souciance
You can do that but I don't think that is the recommend way because it will
probably only work for the default exchange and not the others as they
require a binding.

On Tue, Dec 6, 2016 at 12:37 PM, kaiser75 [via Camel] <
ml-node+s465427n5791096...@n5.nabble.com> wrote:

> apparently there is no way to explicitly specify the queue name in the
> URI. So I just mapped my exchange and the queues as direct and that worked,
> but i'd to create 3 excahnges and map them to each Queue , i'll try the
> topic mode and the routing key to route and see that way i just need one
> exchange.
>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Rabbitmq-URI-tp5791070p5791096.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Rabbitmq-URI-tp5791070p5791097.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Copy current file in a folder

2016-12-06 Thread Hans Orbaan
Use antInclude or implement a fileFilter

-Oorspronkelijk bericht-
Van: axdz [mailto:hoida...@gmail.com] 
Verzonden: Tuesday 6 December 2016 11:38
Aan: users@camel.apache.org
Onderwerp: Copy current file in a folder

Dear all,

I have a route from("file:D:\\folder1").to("file:D:\\folder2").
When route starts,  folder1 has 5 files (file1, file2, file3, file4, file5) 
While route is running, I copy 2 files (file6, file7) into folder1.So when 
route finishs, all files (7 files) were copied to folder2.

I only want to copy 5 file (file1, file2, file3, file4, file5) into folder2.
Please give me some advice.

Thanks,





--
View this message in context: 
http://camel.465427.n5.nabble.com/Copy-current-file-in-a-folder-tp5791093.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Copy current file in a folder

2016-12-06 Thread axdz
Dear all,

I have a route from("file:D:\\folder1").to("file:D:\\folder2").
When route starts,  folder1 has 5 files (file1, file2, file3, file4, file5)
While route is running, I copy 2 files (file6, file7) into folder1.So when
route finishs, all files (7 files) were copied to folder2.

I only want to copy 5 file (file1, file2, file3, file4, file5) into folder2.
Please give me some advice.

Thanks,





--
View this message in context: 
http://camel.465427.n5.nabble.com/Copy-current-file-in-a-folder-tp5791093.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: moving file with camel

2016-12-06 Thread Allan C.
I think using timer/quartz with content enricher (pollEnrich) could be your
solution.

Regards,
Allan C.

On Tue, Dec 6, 2016 at 4:46 PM, Jan Matèrne (jhm)  wrote:

> > -I want to filter multiple format file (as .html,.jpg...).How can I do
> > it?
>
> You could read only these files:
> http://camel.apache.org/file2.html
> Option "fileName": For consumers, it's used as a filename filter.
> Or Options include/antInclude/exclude/antExclude
>
> Or you use a content based router on the message header "CamelFileName".
>
>
>
> > -I want to set time (time format only includes hours as 04:00) for
> > route moving file.Please give me some advice.
>
> Not clear to me, what you mean.
>
>
> Jan
>
>


AW: moving file with camel

2016-12-06 Thread jhm
> -I want to filter multiple format file (as .html,.jpg...).How can I do
> it?

You could read only these files:
http://camel.apache.org/file2.html
Option "fileName": For consumers, it's used as a filename filter.
Or Options include/antInclude/exclude/antExclude

Or you use a content based router on the message header "CamelFileName".



> -I want to set time (time format only includes hours as 04:00) for
> route moving file.Please give me some advice.

Not clear to me, what you mean.


Jan



Re: Camel Websockets : NoClassDefFoundError: org/eclipse/jetty/http/ssl/SslContextFactory

2016-12-06 Thread reddy.janke
Hello Team,

I tried with as per instructions by Maven URL, I used camel 2.14.1 and
Websockets 2.14.1

http://mvnrepository.com/artifact/org.apache.camel/camel-websocket/2.14.1

Still getting below issue.

SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError:
org/eclipse/jetty/servlet/ServletContextHandler
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethod(Class.java:2128)
at
org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.resolveMember(LocalVariableTableParameterNameDiscoverer.java:243)
at
org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.visitEnd(LocalVariableTableParameterNameDiscoverer.java:229)
at org.springframework.asm.ClassReader.b(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at
org.springframework.core.LocalVariableTableParameterNameDiscoverer.inspectClass(LocalVariableTableParameterNameDiscoverer.java:112)
at
org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:85)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:190)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1077)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:981)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)
at
org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:39)
at
org.apache.camel.impl.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:87)
at
org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:366)
at
org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:353)
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:517)
at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:72)
at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:202)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
at
org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
at
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:923)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:187)
at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:805)
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2174)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1906)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:327)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplic

Re: moving file with camel

2016-12-06 Thread axdz
Dear,

-I want to filter multiple format file (as .html,.jpg...).How can I do it?
-I want to set time (time format only includes hours as 04:00) for route
moving file.Please give me some advice.

Thanks,



--
View this message in context: 
http://camel.465427.n5.nabble.com/moving-file-with-camel-tp3779591p5791071.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Rabbitmq URI

2016-12-06 Thread kaiser75
I was going through the documentation for  rabbitmq: component.  

Where can I send the queue name as a parameter in the URI?

When I tried  this 

where orders.error is the name of the queue , a random queue with a UUID as
a name is created.  How do I route my message to the a named queue.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Rabbitmq-URI-tp5791070.html
Sent from the Camel - Users mailing list archive at Nabble.com.