Hi William,

First the good news :)

1. Groovy is supported by Quarkus from 1.0

https://camel.apache.org/camel-quarkus/2.10.x/reference/extensions/groovy.html

2. JavaScript is not supported by Camel anymore. The reason is that the
JavaScript engine (Nashorn) has been deprecated since Java 9 (and totally
removed since Java 15). There are some initiative to run JavaScript in Java
without Nashorn, but they are not implemented in Camel 3:

https://issues.apache.org/jira/browse/CAMEL-14970

More on a general note: Running scripts can be flexible, but also heavy on
processing. How I tackle most cases:

1. Avoid when possible using standard integration patterns and components.
2. Use simple language if needed.
3. Use a template language when 1 and 2 are not possible (for example
Velocity)
3. Write a bean or processor when customization is needed.
4. Use some kind of cloud function (for example, AWS Lambda or Azure
Functions) to do the custom processing.
5. Write your own component (I recently blogged about this:
https://raymondmeester.medium.com/custom-code-in-apache-camel-56c9249d5b24)
etc

I must admit that we actually run some JavaScript and Groovy scripts in our
Camel 2 environments, but I am not that happy about it. Not only from a
performance, failure and security standpoint (we run them sandboxed to
avoid trouble), but especially from an integration view (Camel is an
integration framework, not a script runner/scheduler).

Just my 2 cents. What are your use cases?

Raymond



On Sat, Jul 16, 2022 at 8:06 AM William Pham <will...@witecsvc.com> wrote:

> Hi team,
>
> I'm wondering if there's any support for Script component which support
> JavaScript and Groovy for Camel Quarkus. If not, will it be added in the
> near future?
>
> Thanks for all the efforts!
> Kind Regards,
> W.
>

Reply via email to