Hi

If you use Java RouteBuilder, then you can maybe use spring dependency
injection, to inject the topic name into a String field,
and then use that field when building the route model.

However I have also thought of adding {{bean:xxx?method=aaa}} as a function
to property placeholder.
Though need to give it a bit more thought as this then have
dependency ordering implication (bean must be created beforehand etc).








On Mon, Oct 2, 2023 at 12:40 PM girish vasmatkar <girish...@gmail.com>
wrote:

> Dear Members,
>
> I have been searching for this for quite some time but haven't been able to
> figure out a way to do this.
>
> I need to subscribe to a kafka topic which I will know only at runtime - by
> calling a REST endpoint. The REST API I am calling is creating topics and
> returning the topic name.
>
> I am using spring camel starter and have camel route defined up until I am
> able to fetch the topic name.  How do I then have a route created at
> runtime that uses the topic name from the rest endpoint?
>
> --
> Best,
> Girish Vasmatkar
>


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

Reply via email to