Camel 2 -> 3 migration. OnException & OSGI Classloading
Hi, I'm currently migrating an OSGI application from Camel 2.25 to 3.21. I've encountered a change in the way onException deals with the type it's asked to handle in an OSGI environment. In 2.25 the OnExceptionDefinition instance keeps a reference to the classes it's asked to handle (in the exceptionClasses field). In 3.x it just stores the names of the exception classes it should handle. When the ProcessorReifier builds the route it then loads the required classes named on the definition. My issue is that my camel context is created in one OSGi bundle (with one classloader) and the route added from a different bundle (with its own classloader). In 2.x this worked fine. In 3.x the route can't be started (as the context's classloader can't see the exception class). This design is used to permit plugin modules to add their own routes to the core application's context. Has anyone experienced the same issue and found a solution? I don't want to add Import-Package instructions to the bundle with the Camel Context - as this would break the plugin module design. Using DynamicImport-Package: * in my camel context bundle does resolve the issue but doesn't seem ideal - my plugin bundle should be resolving the exception class. Thanks, Paul
RE: [Camel Mail Component] Caching MimeMultipart
Hi everyone, please let me know if you have any ideas on this topic. Thank you & Best regards, Manuel From: Shenavai, Manuel Sent: 16 January 2024 08:47 To: users@camel.apache.org Subject: [Camel Mail Component] Caching MimeMultipart Hi everyone, We are using the Camel Mail component to fetch mails from a mailbox. The camel exchange will provide the MimeMultipart Object in the exchange body. We now see that every access to this MimeMulitpart will do a remote call to the mailserver. Is there any setting in camel that allows us to prevent this, i.e. by caching the data once it has been loaded? Best regards, Manuel Example Processor: Each time getBody(String.class) is called, a remote calls to the mailserver are done. public void process(Exchange exchange) throws Exception { System.out.println("TEST 1.\n" + exchange.getMessage().getBody(String.class)); System.out.println("TEST 2.\n" + exchange.getMessage().getBody(String.class)); System.out.println("TEST 3.\n" + exchange.getMessage().getBody(String.class)); } After running above lines with debugMode=true, I can see the remote calls: A13 FETCH 1 (BODY.PEEK[1.1]) * 1 FETCH (BODY[1.1] {30} VGhpcyBpcyBhIG1haWwgYm9keQ0K ) A13 OK Success A14 FETCH 1 (BODY.PEEK[1.1]) * 1 FETCH (BODY[1.1] {30} VGhpcyBpcyBhIG1haWwgYm9keQ0K ) A14 OK Success TEST 1. This is a mail body A15 FETCH 1 (BODY.PEEK[1.1]) * 1 FETCH (BODY[1.1] {30} VGhpcyBpcyBhIG1haWwgYm9keQ0K ) A15 OK Success A16 FETCH 1 (BODY.PEEK[1.1]) * 1 FETCH (BODY[1.1] {30} VGhpcyBpcyBhIG1haWwgYm9keQ0K ) A16 OK Success TEST 2. This is a mail body A17 FETCH 1 (BODY.PEEK[1.1]) * 1 FETCH (BODY[1.1] {30} VGhpcyBpcyBhIG1haWwgYm9keQ0K ) A17 OK Success A18 FETCH 1 (BODY.PEEK[1.1]) * 1 FETCH (BODY[1.1] {30} VGhpcyBpcyBhIG1haWwgYm9keQ0K ) A18 OK Success TEST 3. This is a mail body
[RESULT] [VOTE] Release Apache Camel Kamelets 4.0.3
Hello all, The vote passes with the following result: 7 +1 binding votes: Andrea Cosentino, Claus Ibsen, Babak Vahdat, Andrea Tarocchi, Otavio Rodolfo Piske, Zineb Bendhiba and Pasquale Congiusti 3 +1 non-binding votes: Gaelle Fournier, Claudio Miranda and Christoph Deppisch Thanks to all the voters. I'll go ahead with the process.
Re: [VOTE] Release Apache Camel Kamelets 4.0.3
Thanks all the vote passed. I'll go ahead with the release process. Il giorno mer 17 gen 2024 alle ore 19:39 Christoph Deppisch ha scritto: > +1 (non-binding) > > Thank you Andrea! > > Andrea Cosentino schrieb am Mi., 17. Jan. 2024, 09:33: > > > Hello all, > > > > This is a vote for releasing camel-kamelets 4.0.3 > > > > This release will support the 4.0.3 release of Apache Camel. The aim of > the > > release is to have a catalog to use in generating camel-kafka-connector > > 4.0.3 release. > > > > Kamelets release files: > > https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/4.0.3 > > Kamelets staging repository: > > https://repository.apache.org/content/repositories/orgapachecamel-1668 > > Kamelets Tag: > > https://github.com/apache/camel-kamelets/releases/tag/v4.0.3 > > > > Please cast your vote. > > > > [ ] +1 Release camel-kamelets 4.0.3 > > [ ] -1 Veto the release (provide specific comments) > > > > The vote is open for at least 72 hours. > > > > Here's my +1. > > > > Thanks, > > Andrea Cosentino > > >