Hi

Yes custom component or configure the existing default component.
That is standard practice.

 What you do is not good practice - which seems you from a route call a
bean that then somehow change the endpoint that are already in use.

On Tue, Dec 10, 2024 at 2:52 PM Kordowski, Jens
<jens.kordow...@sap.com.invalid> wrote:

> Hi Claus,
>
> thanks for sharing this! Do you foresee any other option to customize the
> binding, which is on the endpoint? Or is a custom component my only option?
>
> Best regards
> Jens Kordowski
>
> -----Original Message-----
> From: Claus Ibsen <claus.ib...@gmail.com>
> Sent: Dienstag, 10. Dezember 2024 14:36
> To: users@camel.apache.org
> Subject: Re: endpoint in io dsl
>
> Hi
>
> <camel:endpoint> is not supported in Camel DSL.
> It's a legacy from old Camel OSGi blueprint and the old spring xml <beans>
>
> On Tue, Dec 10, 2024 at 12:40 PM Kordowski, Jens
> <jens.kordow...@sap.com.invalid> wrote:
>
> > Hello.
> >
> > Using Camel blueprint dsl, I was able to get hold of an endpoint, e.g. an
> > AMQP endpoint:
> >
> > <bean factory-method="configure" factory-ref="amqpConfigurator"
> > id="MessageFlow_4_configurator">
> >     <argument ref="MessageFlow_4"/>
> > </bean>
> >
> > <camel:camelContext id="amqp">
> >         ...
> >         <camel:endpoint id="MessageFlow_4"
> >
> uri="amqp:queue:myqueue?connectionFactory=#qpidConnectionFactory_MessageFlow_4&..."/>
> >         <camel:route id="Process_1">
> >             <camel:from uri="ref:MessageFlow_4"/>
> >             <camel:bean ref="MessageFlow_4_configurator"/>
> >
> > By doing so, I could hand over that endpoint to a "endpoint configurator
> > bean" to manipulate that endpoint. In my particular case, I want to
> extend
> > or replace the AMQPBinding, which is set onto the endpoint.
> >
> > With
> https://camel.apache.org/components/4.8.x/others/java-xml-io-dsl.html
> > I do not see to have the same option to define or obtain the endpoint.
> > Also, I cannot find another extension mechanism for the binding in
> > particular. For endpoint configuration options (like the
> AMQPConfiguration)
> > there is a mechanism via the "configuration" parameter on the endpoint,
> but
> > nothing similar for the binding. I assume the same problem is true for
> JMS,
> > MAIL adapters and probably more.
> >
> > The only way I can currently think of is to create my own Camel component
> > wrapping and extending the AMQP component. I would appreciate your
> feedback
> > on this and hope to get some more ideas.
> >
> > Best regards
> > Jens Kordowski
> >
>
>
> --
> Claus Ibsen
> -----------------
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to