Re: Camel Kafka consumer dynamic topic

2023-10-06 Thread Mark Nuttall
ya. was just saying you need a plan if you wanted to keep consuming the route after restart. anyway, like i said, you have all the pieces to do this. Anything more would be writing it. But here is some pseudo code. from(some Trigger) to(http) // get the topic

Re: Camel Kafka consumer dynamic topic

2023-10-06 Thread Chirag
Mark, Scenario for service restart will cause any dynamic route from being removed. It would require ReST to be idempotent and return or more complex - persisting routes and reloading them. ચિરાગ/चिराग/Chirag -- Sent from My Gmail Account On Thu, Oct 5,

Re: Camel Kafka consumer dynamic topic

2023-10-04 Thread Mark Nuttall
The link that I provided shows you how to dynamically create a new route. So all you need to do is after you've called the rest in point using the HTTP component you use what's returned to call a service method in some Class via the bean EIP. The issue is that if the service restarts you will lose

Re: Camel Kafka consumer dynamic topic

2023-10-04 Thread girish vasmatkar
It's different to what my requirements are. I think dynamic routing in case of a Kafka consumer is different to the examples you have quoted. I can't have Kafka topic declared in property file or a yaml file for that matter because I wouldn't be knowing. In that case it would be pretty easy to

Re: Camel Kafka consumer dynamic topic

2023-10-03 Thread Mark Nuttall
Pretty sure I've done this kind of thing before. I think the info is here https://stackoverflow.com/questions/48380456/dynamic-routing-apache-camel On Tue, Oct 3, 2023, 3:22 AM Claus Ibsen wrote: > Hi > > If you use Java RouteBuilder, then you can maybe use spring dependency > injection, to

Re: Camel Kafka consumer dynamic topic

2023-10-03 Thread Claus Ibsen
Hi I created a ticket https://issues.apache.org/jira/browse/CAMEL-19945 On Tue, Oct 3, 2023 at 9:22 AM Claus Ibsen wrote: > 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

Re: Camel Kafka consumer dynamic topic

2023-10-03 Thread Claus Ibsen
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

Camel Kafka consumer dynamic topic

2023-10-02 Thread girish vasmatkar
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.