Hello,
I’m making a POC to integrate Camunda into our application and see what is possible from a technical standpoint.
I’m aiming for a setup with an external Camunda (currently just docker) and adding @ExternalTaskSubscriptions to our existing spring boot backend.
I’m getting an error “TASK/CLIENT-03006 Topic name ‘demoTask’ has already been subscribed”.
Looking into this I see this is because the spring boot starter starts initialization as reaction on a ApplicationStartedEvent (org.camunda.bpm.client.spring.impl.subscription.SpringTopicSubscriptionImpl#start) and during initialization, an error is thrown (org.camunda.bpm.client.topic.impl.TopicSubscriptionManager#subscribe) if there is already a subscription.
Our backend uses multiple spring boot starters, one of which is spring cloud stream (3.1.1 is our version), which sets up a new SpringApplication for their bindings: spring-cloud-stream/DefaultBinderFactory.java at 803c253810105066cb985bc4d7a3ac7d5773fc7f · spring-cloud/spring-cloud-stream · GitHub
Not sure what the reasoning behind the spring-cloud-stream set up is, but it seems deliberate and and of course the additional ApplicationStartedEvent conflicts directly with the Camunda “is topic already subscribed” check.
Currently, I’m a bit stuck trying to achieve my desired setup with the @ExternalTaskSubscriptions embedded into our backend and I’ll switch to another one.
Any feedback on this problem is appreciated. I don’t think I can resolve this in our application configuration…
Many thanks,
Glen