Hi,
I need Camunda to retrieve data whenever data is present in an Azure Service Bus queue.
These are below challenges am facing,
Live Connection to Azure Service Bus:**
Is it possible for Camunda to maintain a live connection to the Azure Service Bus queue to fetch data in real time (i.e., whenever data is available)?
Issue with Scheduler in Camunda Server:**
I have implemented a Java scheduler to connect to the Azure Service Bus and fetch data if available.
When I run the application directly in Eclipse as a Java application, the scheduler works fine. However, after building the WAR file and deploying it to the Camunda server (using Camunda BPM EE Tomcat 7.18.11), the scheduler does not start.
What could be the reason for this, and how can I ensure the scheduler works after deploying the WAR file in the Camunda server?
Hey @V_Sri, thanks for your question. Without more specifics on your requirement it is kinda difficult to provide very specific advice. But I will have a go at providing some ideas …
Live Connection to Azure Service Bus:** Is it possible for Camunda to maintain a live connection to the Azure Service Bus queue to fetch data in real time (i.e., whenever data is available)?
I don’t think Camunda has to maintain this. If you are in a Spring boot world then could you define a @Component which encapsulates the connection to your messaging broker? Your process instance can delegate to this code through the evaluation of expressions or through delegate code.
Issue with Scheduler in Camunda Server:** I have implemented a Java scheduler to connect to the Azure Service Bus and fetch data if available. When I run the application directly in Eclipse as a Java application, the scheduler works fine. However, after building the WAR file and deploying it to the Camunda server (using Camunda BPM EE Tomcat 7.18.11), the scheduler does not start. What could be the reason for this, and how can I ensure the scheduler works after deploying the WAR file in the Camunda server?
I can’t say why this doesn’t work but why do you need a java scheduler? BPMN can help you. For example, you could define a simple processing workflow like below:
If “Peek queue” service task return true, then dequeue the messages (and presumably process them). Both of these service tasks could be mapped to a method on the component you created above using an expression such as:
The peek/dequeue process can repeat with a throttle (e.g. wait 5 seconds) modelled explicitly as a timer intermediate event.
This is one idea, it’s a polling approach. Other approaches could also work whereby your component is called back as soon as a message arrives and a message event is correlated into your process instance to trigger processing.