Re: Directory synchronization with Camel
Hello, thanks for the tip. But the problem is not that the files will be moved or deleted. No, Camel leave them in the directory and this is right. But when I replace some *file with newer version* (the same file with newer date and time), Camel file component does not recognize this and does nothing. I debuged it and I see here only one solution: *To add the file date and time to the key* for the idempotent repository. The key contains filename only and this is not sufficient. See GenericFileConsumer.isValidFile, where file.getAbsoluteFilePath() is used to search in the repository. *Is it possible to change the key building in GenericFileConsumer* so, that the key contains the file date and time too? The best way to do this is to create a new protected function for key building. So can any subclass overwrite the key building functionality in its way. Thanks Radomir -- View this message in context: http://camel.465427.n5.nabble.com/Directory-synchronization-with-Camel-tp4913807p4916715.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Directory synchronization with Camel
Hi Radomic, You may want to try the noop=true attribute that Ioannis mentioned along with a custom GenericFileFilter which keeps a mapping (e.g. Hashtable) between file names and their last modified date, or an MD5 hash of the file. When scanning each file, compare the current value against the stored value, and if it differs, you can accept the file an update the entry in the Hashtable. Else, reject the file. Regards, Raúl. On 19 October 2011 08:22, Radomir Kadlec radomir.kad...@aura.cz wrote: Hello, thanks for the tip. But the problem is not that the files will be moved or deleted. No, Camel leave them in the directory and this is right. But when I replace some *file with newer version* (the same file with newer date and time), Camel file component does not recognize this and does nothing. I debuged it and I see here only one solution: *To add the file date and time to the key* for the idempotent repository. The key contains filename only and this is not sufficient. See GenericFileConsumer.isValidFile, where file.getAbsoluteFilePath() is used to search in the repository. *Is it possible to change the key building in GenericFileConsumer* so, that the key contains the file date and time too? The best way to do this is to create a new protected function for key building. So can any subclass overwrite the key building functionality in its way. Thanks Radomir -- View this message in context: http://camel.465427.n5.nabble.com/Directory-synchronization-with-Camel-tp4913807p4916715.html Sent from the Camel - Users mailing list archive at Nabble.com.
Intercept on all from in all routes
Hi, I'm using SMX 4.3 with Camel 2.6 I'm trying to have automatic processing done when we receive any message in any route. The purpose is to have a single correlationId to track the incoming message if it undergoes several routes that can even be in several camelcontext (those routes can be deployed in different bundles). I already did it using the interceptFrom in the definition of all my camelContext. But I'd like to have it defined outside of the camelcontext definition, since - I want to have it defined for all the camelcontext (so I want to be sure not to forget it) - many people will write routes and camelcontext bundles, and I don't want to force them to put this in their config, since they can forget and it will add extra noise to their definitions Is there a way to do this ? I already tried to see if I could configure another camelcontext than the DefaultCamelContext, (that could be a solution), but haven't found how to do it. I assume there is also some possibility at the level of OSGI, but haven't found a clue about it... Any help would be greatly appreciated, Mike
Re: Intercept on all from in all routes
On Wed, Oct 19, 2011 at 10:38 AM, Michael Dewitte michael.dewi...@gmail.com wrote: Hi, I'm using SMX 4.3 with Camel 2.6 I'm trying to have automatic processing done when we receive any message in any route. The purpose is to have a single correlationId to track the incoming message if it undergoes several routes that can even be in several camelcontext (those routes can be deployed in different bundles). I already did it using the interceptFrom in the definition of all my camelContext. But I'd like to have it defined outside of the camelcontext definition, since - I want to have it defined for all the camelcontext (so I want to be sure not to forget it) - many people will write routes and camelcontext bundles, and I don't want to force them to put this in their config, since they can forget and it will add extra noise to their definitions Is there a way to do this ? I already tried to see if I could configure another camelcontext than the DefaultCamelContext, (that could be a solution), but haven't found how to do it. I assume there is also some possibility at the level of OSGI, but haven't found a clue about it... Any help would be greatly appreciated, This is something that we are looking into the future with both SMX and Camel. To have it easily be able to hot-deploy interceptors, tracers, and whatnot into SMX, and have those influence Camel apps. Its on the roadmap, in that a bit cryptical title - More flexible routes at runtime http://camel.apache.org/camel-30-roadmap.html Mike -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Intercept on all from in all routes
Thx Claus, I had seen something about this in the dev mailing list. But is there a way for me to do it before next versions ? I need it in the coming days / weeks and don't know when this great feature would be available... Is there some mechanism I can exploit ? Thx for your help anyway, Mike 2011/10/19 Claus Ibsen claus.ib...@gmail.com On Wed, Oct 19, 2011 at 10:38 AM, Michael Dewitte michael.dewi...@gmail.com wrote: Hi, I'm using SMX 4.3 with Camel 2.6 I'm trying to have automatic processing done when we receive any message in any route. The purpose is to have a single correlationId to track the incoming message if it undergoes several routes that can even be in several camelcontext (those routes can be deployed in different bundles). I already did it using the interceptFrom in the definition of all my camelContext. But I'd like to have it defined outside of the camelcontext definition, since - I want to have it defined for all the camelcontext (so I want to be sure not to forget it) - many people will write routes and camelcontext bundles, and I don't want to force them to put this in their config, since they can forget and it will add extra noise to their definitions Is there a way to do this ? I already tried to see if I could configure another camelcontext than the DefaultCamelContext, (that could be a solution), but haven't found how to do it. I assume there is also some possibility at the level of OSGI, but haven't found a clue about it... Any help would be greatly appreciated, This is something that we are looking into the future with both SMX and Camel. To have it easily be able to hot-deploy interceptors, tracers, and whatnot into SMX, and have those influence Camel apps. Its on the roadmap, in that a bit cryptical title - More flexible routes at runtime http://camel.apache.org/camel-30-roadmap.html Mike -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Intercept on all from in all routes
On Wed, Oct 19, 2011 at 10:58 AM, Michael Dewitte michael.dewi...@gmail.com wrote: Thx Claus, I had seen something about this in the dev mailing list. But is there a way for me to do it before next versions ? I need it in the coming days / weeks and don't know when this great feature would be available... Is there some mechanism I can exploit ? Its a bit tricky to do without having to adjust the bundles with the Camel apps being installed. So I dont see an easy way of doing it currently. Even with something like a BundleTracker to react upon bundle add/remove etc. it could possible be a bit tricky. As there is a plan for this on the roadmap I suggest to keep an eye and also get involved so we help build a solution that makes this possible for you in a non intrusive way. Thx for your help anyway, Mike 2011/10/19 Claus Ibsen claus.ib...@gmail.com On Wed, Oct 19, 2011 at 10:38 AM, Michael Dewitte michael.dewi...@gmail.com wrote: Hi, I'm using SMX 4.3 with Camel 2.6 I'm trying to have automatic processing done when we receive any message in any route. The purpose is to have a single correlationId to track the incoming message if it undergoes several routes that can even be in several camelcontext (those routes can be deployed in different bundles). I already did it using the interceptFrom in the definition of all my camelContext. But I'd like to have it defined outside of the camelcontext definition, since - I want to have it defined for all the camelcontext (so I want to be sure not to forget it) - many people will write routes and camelcontext bundles, and I don't want to force them to put this in their config, since they can forget and it will add extra noise to their definitions Is there a way to do this ? I already tried to see if I could configure another camelcontext than the DefaultCamelContext, (that could be a solution), but haven't found how to do it. I assume there is also some possibility at the level of OSGI, but haven't found a clue about it... Any help would be greatly appreciated, This is something that we are looking into the future with both SMX and Camel. To have it easily be able to hot-deploy interceptors, tracers, and whatnot into SMX, and have those influence Camel apps. Its on the roadmap, in that a bit cryptical title - More flexible routes at runtime http://camel.apache.org/camel-30-roadmap.html Mike -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Camel JBI Interaction
Hi, I was going thro http://servicemix.396122.n5.nabble.com/DISCUSS-Rebooting-ServiceMix-5-td4528896.html. Looks like NMR may not be included in Servicemix 5. Will JBI/camel interaction stop working in Servicemix 5? Please let me know your comment. With Best Regards, Diwakar -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JBI-Interaction-tp4857978p4917190.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel JBI Interaction
As you probably have already read, JBI is been considered deprecated (the jbi spec is somewhat dead). In version 4.x users are discouraged of using JBI, and its just there for those already using it. In ServiceMix 5 there will be no option to use JBI at all. -- *Ioannis Canellos* * FuseSource http://fusesource.com ** Blog: http://iocanel.blogspot.com ** Apache Karaf http://karaf.apache.org/ Committer PMC Apache ServiceMix http://servicemix.apache.org/ Committer Apache Gora http://incubator.apache.org/gora/ Committer *
Marshal and Unmarshal files
Hi All, I am trying to Marshal and Unmarshal using the zip format. When I marshal the files to a Zip format, the file name does not changed though I see it compressed in the output folder. I was able to change the name using the fileNameOption to *.zip. But this created a problem when I try to unmarhsal the file and if I used the fileName option as mentioned above, the unmarshaled file (Though uncompressed) has the file name as *.zip. Please help resolve this issue. I need to marshal a file and to it's zipformat witht he file name as (*.zip) and then unmarshal it to it's original fileName. Thanks regards, Ebe -- View this message in context: http://camel.465427.n5.nabble.com/Marshal-and-Unmarshal-files-tp4917704p4917704.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Marshal and Unmarshal files
Hi, Current camel marshal and unmarshal are dealing with the stream not the file. I'm afraid you have to use the fileName header yourself to change the file name. On Wed Oct 19 21:30:10 2011, ebinsingh wrote: Hi All, I am trying to Marshal and Unmarshal using the zip format. When I marshal the files to a Zip format, the file name does not changed though I see it compressed in the output folder. I was able to change the name using the fileNameOption to *.zip. But this created a problem when I try to unmarhsal the file and if I used the fileName option as mentioned above, the unmarshaled file (Though uncompressed) has the file name as *.zip. Please help resolve this issue. I need to marshal a file and to it's zipformat witht he file name as (*.zip) and then unmarshal it to it's original fileName. Thanks regards, Ebe -- View this message in context: http://camel.465427.n5.nabble.com/Marshal-and-Unmarshal-files-tp4917704p4917704.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang
bean as entry point
I want to embed camel into an existing application in order to perform some message routing. The application processes data and I would like this data to then enter a camel route. The camel route will exist in the same VM as the application that is processing the data. What's the easiest way to get the data into the route? Thanks, Mark
Re: bean as entry point
You could: 1. Create a Bean that has a message Producer that sends a message to the route 2. You could also use CXF and then you could also get data from outside your app in the future #1 is the simplest though. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (855) BASE-LOGIC: (227-3564-42) p. (478) BASE-LOGIC (227-3564-42) f. (855) BASE-LOGIC: (227-3564-42) Website: http://www.baselogic.com Blog: http://www.baselogic.com/blog/ Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson --- On Wed, Oct 19, 2011 at 10:09 AM, Mark Webb elihusma...@gmail.com wrote: I want to embed camel into an existing application in order to perform some message routing. The application processes data and I would like this data to then enter a camel route. The camel route will exist in the same VM as the application that is processing the data. What's the easiest way to get the data into the route? Thanks, Mark
Re: Marshal and Unmarshal files
Thanks a lot Williem. I just saw that we could have different expressions passed on the filename parameter, but they do not work. Example: context.addRoutes(new RouteBuilder() { public void configure() { from(file:C:\\camelProject\\data\\outbox).unmarshal().zip() .to(file:C:\\camelProject\\data\\inbox?filename=${file:onlyname.noext}delete=true); } }); Reference : http://camel.apache.org/file-language.html Error: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: To[file:C:\camelProject\data\inbox? filename=${file:onlyname.noext}delete=true] in route: Route[[From[file:C:\camelProject\data\outbox]] - [Marshal[o. .. because of Failed to resolve endpoint: file://C:\camelProject\data\inbox?delete=truefilename=%24%7Bfile%3Aonlyname.n oext%7D due to: Failed to resolve endpoint: file://C:\camelProject\data\inbox?delete=truefilename=%24%7Bfile%3Aonlyname .noext%7D due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{filename=${file:onlyname.noext}}] Regards, Ebe -- View this message in context: http://camel.465427.n5.nabble.com/Marshal-and-Unmarshal-files-tp4917704p4917972.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: FTP producer and exception or transaction
On Mon, Oct 17, 2011 at 9:17 PM, pkleczka pklec...@gmail.com wrote: Thanks Claus I have added JMS Transactions (still in Camel 2.4.0) with no effect. I assume I now need to upgrade to Camel 2.5 and add 'throwExceptionOnConnectionFailed' to the route I want to roll back. Can I upgrade to Camel 2.5 while keeping ActiveMQ 5.4.2? If so, how do I do the upgrade? The option throwExceptionOnConnectionFailed is AFAIR only for the Ftp Consumer (eg to download from FTP server). When you upload to a FTP server from Camel you use the FtpProducer. And it ought to thrown an exception if this fails. Which then should cause the TX to rollback. You may try with the FTP and have some java bean where you throw an exception. And then check if the TX works, by rolling back the transaction. Eg to test without the FTP part, to get it working. And then add the FTP back, and that can narrow down the problem. If there is still an issue, then of course write here again, and we can try to reproduce the issue and see what's the problem is. On Sat, Oct 15, 2011 at 2:58 AM, Claus Ibsen-2 [via Camel] ml-node+s465427n4904861...@n5.nabble.com wrote: On Fri, Oct 14, 2011 at 5:05 PM, pkleczka [hidden email]http://user/SendEmail.jtp?type=nodenode=4904861i=0 wrote: Hello I am using Camel 2.4.0 with Spring DSL and ActiveMQ 5.4.2. I have a route that takes a message off a queue, grabs the correlation ID in order to create a file name, and then FTPs the message. I expected that any exception during this process would roll back so that the message would not be pulled off the queue. FTP was unavailable due to some firewall changes, so my messages got pulled off the queue but never FTPd. I understand that if I use Camel 2.5 I can use throwExceptionOnConnectionFailed. My questions are: 1. Will that prevent the message from being pulled off the queue if FTP is unavailable? If not can I use a transaction tag? 3. Is upgrading to Camel 2.5 as easy as replacing the Camel jars in ActiveMQ's lib? Any caveats with upgrading this way? Are you using transacted JMS ? If not then the message is pulled off the queue immediately when Camel receives the message. You can use transacted JMS to have the message support rollback / commit. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/FTP-producer-and-exception-or-transaction-tp4902912p4902912.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: [hidden email]http://user/SendEmail.jtp?type=nodenode=4904861i=1 Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/FTP-producer-and-exception-or-transaction-tp4902912p4904861.html To unsubscribe from FTP producer and exception or transaction, click herehttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4902912code=cGtsZWN6a2FAZ21haWwuY29tfDQ5MDI5MTJ8OTY3NjE0OTg2. -- View this message in context: http://camel.465427.n5.nabble.com/FTP-producer-and-exception-or-transaction-tp4902912p4911178.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
RE: Marshal and Unmarshal files
Thanks, just found out. -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Wednesday, October 19, 2011 10:33 AM To: users@camel.apache.org Subject: Re: Marshal and Unmarshal files Its with a N in name. filename should be fileName On Wed, Oct 19, 2011 at 4:30 PM, ebinsingh ebenezer.si...@verizonwireless.com wrote: Thanks a lot Williem. I just saw that we could have different expressions passed on the filename parameter, but they do not work. Example: context.addRoutes(new RouteBuilder() { public void configure() { from(file:C:\\camelProject\\data\\outbox).unmarshal().zip() .to(file:C:\\camelProject\\data\\inbox?filename=${file:onlyname.noext}delete=true); } }); Reference : http://camel.apache.org/file-language.html Error: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: To[file:C:\camelProject\data\inbox? filename=${file:onlyname.noext}delete=true] in route: Route[[From[file:C:\camelProject\data\outbox]] - [Marshal[o. .. because of Failed to resolve endpoint: file://C:\camelProject\data\inbox?delete=truefilename=%24%7Bfile%3Aonlyname.n oext%7D due to: Failed to resolve endpoint: file://C:\camelProject\data\inbox?delete=truefilename=%24%7Bfile%3Aonlyname .noext%7D due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{filename=${file:onlyname.noext}}] Regards, Ebe -- View this message in context: http://camel.465427.n5.nabble.com/Marshal-and-Unmarshal-files-tp4917704p4917972.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Issue with recipientList and cxf in 2.8.0?
Hi Just a heads up. I have reproduced the issue. Having the same test works with multicast, but fails with recipient list for camel-cxf. On Mon, Oct 17, 2011 at 2:22 PM, Achim Nierbeck bcanh...@googlemail.com wrote: Hi Claus, sorry I didn't create one yet cause I was very busy delivering our release :) But there is a kind of related issue where I added some details. https://issues.apache.org/jira/browse/CAMEL-4503 I added another description of the strange behaviour I found http://markmail.org/message/hr7hweyyigmxyn3t regards, Achim 2011/10/17 Claus Ibsen claus.ib...@gmail.com On Wed, Oct 12, 2011 at 10:06 PM, sanjai san...@sanjai.org wrote: Hello all, I have a route that had been working fine in our production system. The route is fairly basic. It simply reads messages of a JMS queue, does some processing on the message and then sends the message to multiple cxf endpoints. The sending to multiple endpoints is done by using recipientList as follows: recipientList delimiter=, headerrecipientList/header /recipientList Where the recipientList will look like this in my test environment: cxf:bean:csgEndpoint?address= http://localhost:9091/,cxf:bean:csgEndpoint?address=http://localhost:9090/ Smells like CxfEndpoint may have an issue in its getEndpointKey() which is the uid of the endpoint. It ought to return an unique String, so there is 2 distinct endpoints. Checking the source code in camel-cxf in the CxfEndpoint could hunt down this issue. I assume there is already a JIRA ticket? If possible can you create an unit test which reproduces this issue? The recipientList is generated dynamically. This was working fine in camel 2.7.3. However, it broke when I upgraded to 2.8.0. In 2.8.0, the web service on port 9091 will only be called for the first message processed. After that it will not be called, but the web service on port 9090 will be called twice for each message. Really weird. Again, this was working fine in 2.7.3. I looked at the 2.8.0 release notes but not see anything obvious on changes to recipientList that will cause this Has anywone else seen this or have any ideas on how to get around this issue? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Issue-with-recipientList-and-cxf-in-2-8-0-tp4896788p4896788.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- -- *Achim Nierbeck* Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: bean as entry point
I am looking at the pojo-producing documentation, and I don't see how to inject the right information into my class. I have this as a test class: import org.apache.camel.InOnly; import org.apache.camel.Produce; public class DummyPackageProducerBean { @Produce(uri=seda:sendstuffhere) protected DummyInterface producer; public void whatever(){ producer.sendPackage(Hello World); } } @InOnly interface DummyInterface { public void sendPackage( String name ); } When I run my code which loads the camel context file using a FileSystemXmlApplicationContext, I get the following exception: Exception in thread main java.lang.NullPointerException at com.xxx.camel.filter.engine.producer.DummyPackageProducerBean.whatever(DummyPackageProducerBean.java:13) at com.xxx.camel.filter.engine.DemoRoutes.main(DemoRoutes.java:25) On Wed, Oct 19, 2011 at 10:27 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Yeah for #1 in the bean (eg in your java code) you can inject a Camel ProducerTemplate http://camel.apache.org/producertemplate.html And then from one line of code send the message into Camel. You can also use annotations like @Produce as well http://camel.apache.org/pojo-producing.html See details here also http://camel.apache.org/bean-integration.html On Wed, Oct 19, 2011 at 4:12 PM, Mick Knutson mknut...@baselogic.com wrote: You could: 1. Create a Bean that has a message Producer that sends a message to the route 2. You could also use CXF and then you could also get data from outside your app in the future #1 is the simplest though. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (855) BASE-LOGIC: (227-3564-42) p. (478) BASE-LOGIC (227-3564-42) f. (855) BASE-LOGIC: (227-3564-42) Website: http://www.baselogic.com Blog: http://www.baselogic.com/blog/ Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson --- On Wed, Oct 19, 2011 at 10:09 AM, Mark Webb elihusma...@gmail.com wrote: I want to embed camel into an existing application in order to perform some message routing. The application processes data and I would like this data to then enter a camel route. The camel route will exist in the same VM as the application that is processing the data. What's the easiest way to get the data into the route? Thanks, Mark -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: can't route from servlet component to http component
thanks, Willem, but that didn't improve my results. According to the stream-caching page you referenced, the Multicast component will implicitly cache streams to ensure that all the endpoints can access the message content; setting it explicitly does not change the behavior. Also, the to uri=http://0.0.0.0:9080/send/license/ endpoint in the route is a second instance of the service running at to uri=http://192.168.22.95:8135/transform-service/send/license/ -- the goal of this route is to recceive a service call and multicast it. The second instance is simply running on my local machine (on a different port than the Jetty server that's hosting my route). To simplify the route, i dropped the multicast component, so it looks like this: route id=myRoute streamCache=true from uri=servlet:///license/ to uri=http://192.168.22.95:8135/transform-service/send/license/ /route When i post to the servlet, i still get the same error: [CamelHttpTransportServlet.service]: No consumer to service request [POST /send/license - to me, it looks like the request isn't reaching the servlet. thanks again, Joe *Joe Niski* Senior Developer - Information Services | NWEA™ PHONE 503.548.5207 | FAX 503.639.7873 NWEA.ORG http://www.nwea.org/ | Partnering to help all kids learn™ On 10/18/2011 09:17 PM, Willem Jiang wrote: First you need to cache the stream[1] for posting it across different endpoints. to uri=http://0.0.0.0:9080/send/license/ will create a producer, it doesn't listen to the address as you want. [1]http://camel.apache.org/stream-caching.html On 10/19/11 7:18 AM, Joe Niski wrote: I'm trying to configure a multicast route that receives an HTTP POST and POSTs it to multiple instances of a service. From reading the documentation, the book, this list, and playing with the camel-example-servlet-tomcat, it looks like it should be simple, but i'm stuck. Here's my web.xml for configuring the Camel Servlet: web-app !-- location of spring xml files -- context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/applicationContext.xml/param-value /context-param !-- Camel servlet -- servlet servlet-nameMulticastServlet/servlet-name servlet-classorg.apache.camel.component.servlet.CamelHttpTransportServlet/servlet-class load-on-startup1/load-on-startup /servlet !-- Camel servlet mapping -- servlet-mapping servlet-nameMulticastServlet/servlet-name url-pattern/send/*/url-pattern /servlet-mapping !-- the listener that kick-starts Spring -- listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener welcome-file-list welcome-fileWEB-INF/index.xhtml/welcome-file /welcome-file-list /web-app Here's my camel context and route: camelContext trace=true id=multicastCtx xmlns=http://camel.apache.org/schema/spring; route id=multicastRoute from uri=servlet:///license/ multicast stopOnException=false to uri=http://192.168.22.95:8135/transform-service/send/license/ to uri=http://0.0.0.0:9080/send/license/ /multicast /route /camelContext The service expects data in request parameters. i can post directly to both endpoint URIs with an http tool (Poster plugin for Firefox) successfully. However, when i post to this webapp (running in Jetty), at the URI http://localhost:8080/send/license; i get a 404 error. In the Jetty debug log, i see DEBUG [CamelHttpTransportServlet.service]: No consumer to service request [POST /send/license] I suspect i'm missing something obvious in configuring the URI for the Camel servlet. thanks in advance, Joe
Re: Issue with recipientList and cxf in 2.8.0?
Awesome. Thanks Claus. Hopefully it will be fixed by the next release. -- View this message in context: http://camel.465427.n5.nabble.com/Issue-with-recipientList-and-cxf-in-2-8-0-tp4896788p4918821.html Sent from the Camel - Users mailing list archive at Nabble.com.
XMPP Register
I'm having quite a bit of trouble understanding how to have an automatic registration working with Camel XMPP talking to my EJabberD server. Essentially, I have ServiceMix with Camel running on the same machine as an EJabberD instance. I have reviewed the docs at http://camel.apache.org/xmpp.html and they are a bit confusing. Supposing I had a EJAbberD domain setup as centos, and an admin user/password combination as admin and password, if I wanted to register a user test with password testpassword, would the correct URI be one of the following? xmpp://test@centos/testagent:5222/?createAccount=truepassword= testpassword xmpp://admin@centos:5222/test@centos/testagent?createAccount=truepassword= testpassword xmpp://admin@centos:5222/test@centos?createAccount=truepassword= testpassword xmpp://test@centos:5222/?createAccount=truepassword= testpassword It is not clear to me if the password is for the account I'm trying to create or if it is for the admin user. It is also not clear whether or not I need an agent at the end of the jabber ID I'm trying to create. I also cannot figure out if there needs to be a body for the create account command, and if so, what it should the payload look like. Finally, I'm an EJabberD configuration newbie and after reviewing the docs and various help entries/forumns, I added some configuration to my ejabberd.cfg: {access, register, [{allow, admin}]}. ... {modules, { ... {mod_register, [{access, register}]} ]}. To no avail. The stack traces I'm getting are MASSIVE and I don't even know where to begin breaking them down for a coherent email. Thank you, Zach
dynamically setting username/password for jms
I am using camel to post messages to a JMS queue (ApacheMQ). I need to be able to set a different username and password per message posted. Looking through the documentation, samples, tutorials and forums, I have not found a way to do this. Would someone give me a pointer on how I can do this? Thank you Doug -- View this message in context: http://camel.465427.n5.nabble.com/dynamically-setting-username-password-for-jms-tp4919276p4919276.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Missing detail element in SOAP fault
I guess the questions would be: 1) What version of Camel? 2) What does the route look like? Is it using camel-cxf or similar? Dan On Tuesday, October 18, 2011 5:41:41 AM sengel wrote: Hello, we have a system consisting of (web and other) clients and our backend (SOAP web services). Now when we throw a Fault/Exception in a backend operation, the SOAP fault looks like this: env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/; env:Header/ env:Body env:Fault faultcodeenv:Server/faultcode faultstringAn entity with the same ID already exists/faultstring detail ns2:duplicateEntityFault xmlns:ns2=http://www.example.com/example/; reasonEntity was not created. An entity with the same ID already exists/reason /ns2:duplicateEntityFault /detail /env:Fault /env:Body /env:Envelope The client side uses the subelement duplicateEntityFault of detail to generate the Exception class which we expect and catch (DuplicateEntityFault_Exception). So now we added Camel to the setup which routes requests to the backend. We expected that if a Fault/Exception is thrown on the backend, Camel would just pass it back to the client. But, no. Instead the client gets this: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body soap:Fault faultcodesoap:Server/faultcode faultstringHTTP operation failed invoking http://www.example.com/example/example-service with statusCode: 500/faultstring /soap:Fault /soap:Body /soap:Envelope So the problem is that there is no detail element in the fault message from which the client can generate the Exception. Camel logs this: Exhausted after delivery attempt: 1 caught: org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking http://www.example.com/example/example-service with statusCode: 500 Could you please tell us what is missing or what we do wrong? Thanks in advance, Sebastian -- View this message in context: http://camel.465427.n5.nabble.com/Missing-detail-element-in-SOAP-fault-tp49 13512p4913512.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com
asynchronours request reply using camel-netty
Is it possible to do the following using camel-netty 1. Connect to a server and post a message asynchronously 2. Reply can come at any time and order might be different. 3. Correlation Id is passed to the server and server would reply with the correlation id set 4. Need to send some specific set of messages(like sign on message, key exchange etc) before start sending any other general messages 5. Every 24 hours needs to send a special key exchange message 6. if the connection is lost then retry till connection is available. in the mean time no messages should be accepted for sending to server. Any information provided would be of great help Thanks for your valuable time -- View this message in context: http://camel.465427.n5.nabble.com/asynchronours-request-reply-using-camel-netty-tp4919606p4919606.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: dynamically generating routes
try with the dynamic router (recipient list on versions 2.4 or older) http://camel.apache.org/dynamic-router.html regards -- View this message in context: http://camel.465427.n5.nabble.com/dynamically-generating-routes-tp4919636p4919697.html Sent from the Camel - Users mailing list archive at Nabble.com.
dynamically generating routes
I would like to know if following is possible: I want to send messages to different assets. Let's say I have two listeners A and B. Listener A is configured on port 2000 and Listener B is configured on port 2500. For each listener there is a queue. I send a healthCheck message which contains information like message type, and the asset type etc. Message type tells what type of request it is i.e. in my example, it is health check. The asset type will be used to connect to database to determine which queue has to be used. In this way we will have the request type and the queue name. How can I create a CAMEL route dynamically. What I have seen so far is that I have to create a route using JAVA DSL which means I will have to creae a java file and compile it or I have to create route using Spring DSL in whic case I have to create route in put it in the XML file. I need to how can I create a route at run time to develop a solution for my scenario. -- View this message in context: http://camel.465427.n5.nabble.com/dynamically-generating-routes-tp4919636p4919636.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: can't route from servlet component to http component
Hi It looks like the camel context is not loaded rightly. Are you following the configuration of camel-example-servlet-tomcat? Which version of Camel are you using ? Can you try the latest release Camel 2.8.1 ? On Thu Oct 20 00:16:22 2011, Joe Niski wrote: thanks, Willem, but that didn't improve my results. According to the stream-caching page you referenced, the Multicast component will implicitly cache streams to ensure that all the endpoints can access the message content; setting it explicitly does not change the behavior. Also, the to uri=http://0.0.0.0:9080/send/license/ endpoint in the route is a second instance of the service running at to uri=http://192.168.22.95:8135/transform-service/send/license/ -- the goal of this route is to recceive a service call and multicast it. The second instance is simply running on my local machine (on a different port than the Jetty server that's hosting my route). To simplify the route, i dropped the multicast component, so it looks like this: route id=myRoute streamCache=true from uri=servlet:///license/ to uri=http://192.168.22.95:8135/transform-service/send/license/ /route When i post to the servlet, i still get the same error: [CamelHttpTransportServlet.service]: No consumer to service request [POST /send/license - to me, it looks like the request isn't reaching the servlet. thanks again, Joe *Joe Niski* Senior Developer - Information Services | NWEA™ PHONE 503.548.5207 | FAX 503.639.7873 NWEA.ORG http://www.nwea.org/ | Partnering to help all kids learn™ On 10/18/2011 09:17 PM, Willem Jiang wrote: First you need to cache the stream[1] for posting it across different endpoints. to uri=http://0.0.0.0:9080/send/license/ will create a producer, it doesn't listen to the address as you want. [1]http://camel.apache.org/stream-caching.html On 10/19/11 7:18 AM, Joe Niski wrote: I'm trying to configure a multicast route that receives an HTTP POST and POSTs it to multiple instances of a service. From reading the documentation, the book, this list, and playing with the camel-example-servlet-tomcat, it looks like it should be simple, but i'm stuck. Here's my web.xml for configuring the Camel Servlet: web-app !-- location of spring xml files -- context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/applicationContext.xml/param-value /context-param !-- Camel servlet -- servlet servlet-nameMulticastServlet/servlet-name servlet-classorg.apache.camel.component.servlet.CamelHttpTransportServlet/servlet-class load-on-startup1/load-on-startup /servlet !-- Camel servlet mapping -- servlet-mapping servlet-nameMulticastServlet/servlet-name url-pattern/send/*/url-pattern /servlet-mapping !-- the listener that kick-starts Spring -- listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener welcome-file-list welcome-fileWEB-INF/index.xhtml/welcome-file /welcome-file-list /web-app Here's my camel context and route: camelContext trace=true id=multicastCtx xmlns=http://camel.apache.org/schema/spring; route id=multicastRoute from uri=servlet:///license/ multicast stopOnException=false to uri=http://192.168.22.95:8135/transform-service/send/license/ to uri=http://0.0.0.0:9080/send/license/ /multicast /route /camelContext The service expects data in request parameters. i can post directly to both endpoint URIs with an http tool (Poster plugin for Firefox) successfully. However, when i post to this webapp (running in Jetty), at the URI http://localhost:8080/send/license; i get a 404 error. In the Jetty debug log, i see DEBUG [CamelHttpTransportServlet.service]: No consumer to service request [POST /send/license] I suspect i'm missing something obvious in configuring the URI for the Camel servlet. thanks in advance, Joe -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang
Re: Missing detail element in SOAP fault
It looks like you are using the camel-http component to send the request to the server. Can you show us you camel route ? -- View this message in context: http://camel.465427.n5.nabble.com/Missing-detail-element-in-SOAP-fault-tp4913512p4920338.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: dynamically setting username/password for jms
Are these username password used for authentication? Or you just need to set them in the JMS properties ? If you are using them for authentication, I don't think current camel-jms can do this kind of work. On Thu Oct 20 04:06:57 2011, dkohlert wrote: I am using camel to post messages to a JMS queue (ApacheMQ). I need to be able to set a different username and password per message posted. Looking through the documentation, samples, tutorials and forums, I have not found a way to do this. Would someone give me a pointer on how I can do this? Thank you Doug -- View this message in context: http://camel.465427.n5.nabble.com/dynamically-setting-username-password-for-jms-tp4919276p4919276.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang