I need to enrich the /RedeliveryPolicy/ with custom attributes, so I have
subclassed it.
Then I subclassed /DefaultExceptionPolicyStrategy/ in order to properly map
custom /RedeliveryPolicy/ instances to exception types.
/DeadLetterChannelBuilder.onExceptionOccurred/ I need to get access to
/currentRedeliveryPolicy/ and its custom attributes, so I subclassed
/DeadLetterChannel/ in order to intercept the /RedeliveryData/ parameter of
/DeadLetterChannel.onExceptionOccurred/ method calls and save its
/currentRedeliveryPolicy/ into an exchange property.
So far it's UGLY.
But at this point I've seen that
/RedeliveryErrorHandler.RedeliveryData.currentRedeliveryPolicy/ has package
visibility, so I need to introduce a class with package
/org.apache.camel.processor/ just to access that field.
The problem is that this easily becomes a MESS when I try to run this in an
OSGi environment, cause it makes /org.apache.camel.processor/ a splitted
Is there any better way to achieve the same?
davide_cavestro 's gravatar image asked Feb 17 2017 at 07:09 in Camel-Users by davide_cavestro

3 Answers

This is not intended for end users to do
Claus Ibsen
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Claus Ibsen 's gravatar image answered Feb 17 2017 at 07:35 by Claus Ibsen
@Claus could you please elaborate on it?
How can I react to exceptions, based on their types and some related
configuration defined for the whole context?
i.e. I need to enrich the original redelivery behavior with further attempts
Claus Ibsen-2 wrote
davide_cavestro 's gravatar image answered Feb 17 2017 at 07:44 by davide_cavestro
Study error handler some more it can do a lot.
And if you have Camel in Action 2nd ed book then read the chapter it
cover a lot about error handling and how it works.
Claus Ibsen
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Claus Ibsen 's gravatar image answered Feb 17 2017 at 07:51 by Claus Ibsen

Related Discussions

  • [camel] in Activemq-users

  • What is the relation of Camel to ServiceMix-EIP? Is one somehow the historical ancestor of the other? Or are they intended to be equivalent functionality, but in different settings? -- View this message in context: http://www.nabble.com/-camel--tf3796253s2354.html#a10737590 Sent from the ActiveMQ - User mailing list archive at Nabble.com....

  • Camel in Camel-users

  • Hi, How can split the below text in camel so that i can fetch the value. And i am trying like this .setHeader("table1", simple("${body[1]}:${body[2]")) but its not fetching element name. I am expecting "table1" should have BD_COMPANIES_T and "table2" should have BD_COMPANIES. Please advice. View this message in context: http://camel...

  • Camel in Camel-users

  • Hi, I want read below file in camel, Can you please help me how to router for this? View this message in context: http://camel.465427.n5.nabble.com/Camel-tp5759735.html Sent from the Camel - Users mailing list archive at Nabble.com....

  • Camel Transactions in Camel-users

  • Hi, My route is like this from (dbtq:bd) .to(direct:myendpoint) from(direct:myendpoint) .to(jms:activemq) Here from (dbtq:bd) .to(direct:myendpoint) dbtq:bd is always polling the records from database and putting in to the direct endpoint, after getting the records from data base we are updating the status like completed, if we can get any errors in between this route we need to roll back the status...

  • Camel-Xmpp in Camel-users

  • Hi, I've been trying to use Apache Camel - camel-xmpp to create some routes between XMPP clients/server. I'm having some problems working with presences. I've been searching and found some issues to be resolved, is there an idea when an new version would be available? For instance is possible to simulate a xmpp boot/client with apache camel, add friends to his roster and receive their presences...

  • Camel Splitter in Camel-users

  • Hi, I'm using Camel v.2.2. I have a problem with splitter. This code Splitter's input data come from jdbc component - query returns two table's columns. ${in.body} doesn't works as I expect. Method test of my bean is invoked with String's argument type. Following code works fine and method test of my bean is invoked with HashMap's argument type. ${in.body} ...

  • Camel-ibatis in Camel-users

  • Hi all. As a newcomer to camel I would be very grateful if you helped me. The problem is with camel IBATIS component. I am making the simple camel ibatis component which selects information from database table, deletes it from same database table and sends the information to http provider. All is working but now i need to implement additional feature - I need to lock the mysql table before selection...

  • Camel Tracing !! in Camel-users

  • I want to trace the exchanges to a JMS queue but what I got is only the headers! My code is : Tracer tracer = new Tracer(); tracer.setDestinationUri("jms:trace"); tracer.setTraceOutExchanges(true); DefaultTraceFormatter formatter = new DefaultTraceFormatter(); formatter.setShowOutBody(true); formatter.setShowOutBodyType(true); tracer.setFormatter(formatter); //...

  • Camel Aggregator in Camel-users

  • Hi, I have a topic and consumer consuming messages from this topic. I'd like to save data from those messages to database using batch processing. I'm using aggregator EIP and processor like this: But in process method of my processor I have single exchange while I expects list of exchanges (processor will save data to database). How can I...

  • Camel Security in Camel-users

  • Hi, I am currently working on Drools (http://www.jboss.org/drools) Camel integration. One requirement popped up is to provide a secured access to Drools KnowledgeSession . For those who is not familiar with Drools, Drools KnowledgeSession is defined as a Camel process or endpoint. Basically this means an authentication framework and an authorization framework that can be used to provide service ...

  • Camel-configuration in Camel-users

  • How could i make a simple programme using apache camel?? please write all simple steps.. i am very new to these technology View this message in context: http://camel.465427.n5.nabble.com/Camel-configuration-tp5732936.html Sent from the Camel - Users mailing list archive at Nabble.com....

  • Camel-xmljson in Camel-users

  • trying a marshall a simple xml to json using xmljson, however json-lib seems to be returning a JSONArray instead of a JSONObject. Not sure if it is a bug? related entries in camel context this is a test message value3 value2 value1 [#1 - JmsConsumer[test.MyQueue]] XMLSerializer INFO Using default type string [#1 - JmsConsumer[test.MyQueue...

  • Camel-process in Camel-users

  • Can we write process inside process in camel? how? View this message in context: http://camel.465427.n5.nabble.com/Camel-process-tp5733662.html Sent from the Camel - Users mailing list archive at Nabble.com....

  • Camel Multicast in Camel-users

  • Hi I am using camel 2.4 I know its a old version of camel but I need a help badly I am using multiacast to process same message differently. I wanted to replies from both the message ,so if one endpoint fails to process the message ,the 2nd endpoint also stop the processing and the message will go to the errorHandle block. for that i am using customAggregationStrategy so i can get a control of both...

  • Camel Enrichment in Camel-users

  • hi, The camel enrich processor needs an aggregation strategy to be implemented,where I need to implemented my own bean to enrich.The scenario that I want to implement is where an xml is inserted an element for which the data is from the database. This data from the database is queried based on the few attributes from the xml message. How can I perform this using the aggregation strategy? ...

  • Camel Confusion in Camel-users

  • Dear All, I'm suddenly feel a bit loss on the usage and behaviour of camel and will like to seek clarification. ${body} ...

  • Camel Sftp in Camel-users

  • Hi there, I am very new to Camel and try to solve the following problem. I have files on Server A and want to copy them to Server B and then read the content and save the content to a database. I want to process every file only once… I started to set up a camel route like this: from("sftp://serverA:/../." + "" + "./dir/?privateKeyFile=/someFile/" + "....

  • Camel Roadmap in Camel-users

  • An error occured while fetching this message, sorry !...

  • CXFRS + Camel in Camel-users

  • Hi there, I am using CXFRS in Camel, I am trying two send a big string(XML format) through URL, but I am getting a 413 Http error(Full Head), how can I increase buffer size? regards -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-Camel-tp5688176.html Sent from the Camel - Users mailing list archive at Nabble.com....

  • Camel Metamodel in Camel-users

  • Hi All, Is there any effort being put in developing a camel metamodel which can then be used to create camel routes during design time using a graphical editor? I have seen the graphical editor from fuse source, but it is not based on any meta-model. In fact it is not even a generator and it still requires users to know all possible properties for any endpoint. It is just a graphical representation...