Camel Project Executable Jar
Hi, I want to package my project as a JAR file with all dependencies. * Or should I actually solve it in another way? We haven't decided how it should be hosted yet * Anyhow, I use maven-shade-plugin to package my project. 1. Get loads of warnings: "[WARNING] We have a duplicate" 2. Any improvements or changes I should consider? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Project-Executable-Jar-tp5763937.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Project Executable Jar
And the alternative would be using this? But then I still get an error.. I'm using the same version for all my dependencies and so on org.apache.camel camel-spring ${camel-version} org.apache.maven.plugins maven-jar-plugin true no.norsktipping.ntrouter.chain.ChainMain But then I get Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/camel/spri ng/Main at ChainMain.main(ChainMain.java:15) Caused by: java.lang.ClassNotFoundException: org.apache.camel.spring.Main at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Project-Executable-Jar-tp5763937p5763940.html Sent from the Camel - Users mailing list archive at Nabble.com.
Splitting xml - Send all items or send XML to Error Queue
Hi, So I have a XML data which i will split, transform every item, send every item to validator and then send to an endpoint. But I want to be sure all items validate before sending them to the endpoint, so its All or None, if an error would arise on any item I want to send the XML data(before splitting) to my ErrorQueue. How could I achieve this? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Splitting-xml-Send-all-items-or-send-XML-to-Error-Queue-tp5764002.html Sent from the Camel - Users mailing list archive at Nabble.com.
Java ActiveMQConnectionFactory BrowsableEndpoint
Is there a reason why this does not work? If I remove the persistent=false it does work the first time but when running the test again the message will already be there, so i will get "collection size was <2>" java.lang.AssertionError: Expected: a collection with size <1> but: collection size was <0> It does work if I define the jmscomponent as a springbean instead, but wouldnt like to use spring. @Test public void test() throws Exception { context.addComponent("wmq", jmsComponent(new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"))); context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("direct:a").to("wmq:queue:b"); } }); NotifyBuilder notify = new NotifyBuilder(context).from("wmq:queue:b").whenDone(1).create(); template.sendBody("direct:a", "body"); notify.matches(3, SECONDS); BrowsableEndpoint be = context.getEndpoint("wmq:queue:b", BrowsableEndpoint.class); assertThat(be.getExchanges(), hasSize(1)); } -- View this message in context: http://camel.465427.n5.nabble.com/Java-ActiveMQConnectionFactory-BrowsableEndpoint-tp5764037.html Sent from the Camel - Users mailing list archive at Nabble.com.
JMX objectname of processors MBeans
Hi, I have a Processor defined as the following, @ManagedResource(description = "Wiretap value") public class WiretapValue implements Processor { But to actually be able to see this in Jconsole, I can't use .process() in my routebuilder but need to use .bean((WiretapValue) getContext().getRegistry().lookupByName("wiretapValue")) I am not using Spring and adding it to the registry by: main.bind("wiretapValue", new WiretapValue()); *Anyhow*, In JConsole this now pops up as "bean2", in org.apache.camel -> processors -> camel-1 -> bean2, it has the correct description but is it possible to have another name?? Making it unique and easier to locate? -- View this message in context: http://camel.465427.n5.nabble.com/JMX-objectname-of-processors-MBeans-tp5764684.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMX objectname of processors MBeans
That does not help as I can see it. What I would like to do is to set the ID, since the objectName=...name="bean-2", the name is the ID -- View this message in context: http://camel.465427.n5.nabble.com/JMX-objectname-of-processors-MBeans-tp5764684p5764696.html Sent from the Camel - Users mailing list archive at Nabble.com.
Possible to check that endpoints exist?
Is it possible to verify that all outgoing endpoints exists? For example from("wmq:queue:A").to("wmq:queue:B") It will validate A on the fly, since it tries to get data from the A queue. But B is "validated" once it tries to send the message to that endpoint. Is it possible validate that queue somehow? In case of B not existing, that won't be notified until a message is tried to be sent there in runtime. -- View this message in context: http://camel.465427.n5.nabble.com/Possible-to-check-that-endpoints-exist-tp5764884.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Possible to check that endpoints exist?
Sorry about that. Yes its a (transactional) JmsComponent for websphere message queue -- View this message in context: http://camel.465427.n5.nabble.com/Possible-to-check-that-endpoints-exist-tp5764884p5764887.html Sent from the Camel - Users mailing list archive at Nabble.com.
Handling splitting and error handling
from("direct:inbound") .multicast().parallelProcessing().to("direct:a", "direct:b"); //message a from("direct:a").processRef("processor_a").to("validator:a.xsd") .multicast().parallelProcessing().to("jms:q1", "jms:q2"); //message b from("direct:b").processRef("processor_b").to("validator:b.xsd") .multicast().parallelProcessing().to("jms:q3", "jms:q4"); I only want to send the messages a and b to their JMS endpoints IF both A and B has been validated without problems, if not the message should be sent to the error queue. The processors are transformers and will transform the messages to different xsd versions -- View this message in context: http://camel.465427.n5.nabble.com/Handling-splitting-and-error-handling-tp5765748.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Handling splitting and error handling
So well, this can be handled by using transacted() after picking up the message from direct:inbound, making it look like: from("direct:inbound") .transacted() .multicast().parallelProcessing().to("direct:a", "direct:b"); But there's another issue then. If I have onException(Exception.class).handled(true).useOriginalMessage().to("jms:errorQueue") It WILL not rollback the messages from the endpoints, for example if it fails to validate for message a, it will still send the message b to q3 and q4. But when having handled(false) it will not. But then it *will also rollback the message to the inbound queue* AND post it to the errorQueue? -- View this message in context: http://camel.465427.n5.nabble.com/Handling-splitting-and-error-handling-tp5765748p5765819.html Sent from the Camel - Users mailing list archive at Nabble.com.
Websphere MQ and PROPAGATION_REQUIRES_NEW does not work
Hi, I'm trying to get the transactions to work, have been through the documentation and the book. WMQ = websphere message queue My goal: * Get a message from the inbound queue * Multicast it to 2 direct-queues <-- should be transactional, if something fails the message should go to error queue * the direct queue will process the message and multicasts to different WMQ queues The problem is *PROPAGATION_REQUIRES_NEW *does not work, it does not create a new transaction. If I use *PROPAGATION_REQUIRED*, it does work, but then it rollbacks the message to the inbound queue, which is a problem. So I see 2 possible solution but haven't been able to fix any of them: 1. The *deadLetterChannel *should be the error queue, as with ActiveMQ, it actually sends the message to the ActiveMQ.DLQ, but I can't get this to work. I guess it is related to the* transactionalErrorHandler()* which I have no clue how to fix 2. Get the PROPAGATION_REQUIRES_NEW to work The code, which does not have any handling of deadLetter or so now: -- View this message in context: http://camel.465427.n5.nabble.com/Websphere-MQ-and-PROPAGATION-REQUIRES-NEW-does-not-work-tp5766013.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Websphere MQ and PROPAGATION_REQUIRES_NEW does not work
Little note, PROPAGATION_REQUIRES_NEW does work when being in the same route, but once I send it to a direct: queue it fails. And yes, the seda:queue I did since I didn't get the deadLetterQueue to work... from("seda:abc").log("Seda sent to error queue").to(errorQueue); from(inbound_queue) .log(" Handle message ${body}") .onException(Exception.class).handled(true).log("... Rollbacks").to("seda:abc").markRollbackOnlyLast().end() .transacted(PROPAGATION_REQUIRES_NEW) .to(a1).throwException(new Exception("error")); -- View this message in context: http://camel.465427.n5.nabble.com/Websphere-MQ-and-PROPAGATION-REQUIRES-NEW-does-not-work-tp5766013p5766031.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Multicast with Transaction and PROPAGATION_REQUIRES_NEW does not work
Another edit: This is not a problem with Websphere, but a *bug with multicast and PROPAGATION_REQUIRES_NEW*! Camel version: 2.15.1 -- View this message in context: http://camel.465427.n5.nabble.com/Multicast-with-Transaction-and-PROPAGATION-REQUIRES-NEW-does-not-work-tp5766013p5766054.html Sent from the Camel - Users mailing list archive at Nabble.com.
Local JMS transaction failed to commit
Trying to setup a Camel application to use liberty profile jmsConnectionFactory, being able to do commits to the producer queue. So then we don't want a local jms transaction, but there still is one, how should this be handled? -- View this message in context: http://camel.465427.n5.nabble.com/Local-JMS-transaction-failed-to-commit-tp5766379.html Sent from the Camel - Users mailing list archive at Nabble.com.