How to use <proxy> with Camel 4 and Spring?

43 Views Asked by At

Camel-spring 3 used to have a configuration field for XML called <proxy> (see XML schema)

For example:

<proxy id="myAbcService"
    serviceInterface="com.test.MyAbcService"
    serviceUrl="direct:abcService"/>

Upgrading to Camel 4, this property is gone in the spring-camel XML definition. Commenting this out causes NoSuchBeanDefinitionExeption.

What is the alternative to <proxy> in Camel 4?

The upgrade docs mention this functionality is removed, but doesn't explain any alternative for upgrading.

In Spring XML <proxy> and <remote> have been removed. They were only available in Spring XML and not in the other XML DSLs (Blueprint and CDI).

1

There are 1 best solutions below

0
reddiamond92 On

maybe this Answer is helping you:

Manage Proxy with custom Bean?

Its pointing out, that you can inject an instance of ProducerTemplate in a custom bean to make your request.