product-sp
product-sp copied to clipboard
The RabbitMQ queues are not getting destroyed on deleting rules.
I've created few rule templates which will connect with RabbitMQ fanout exchange and all rules will listen to a single topic and the message will be passed to all queues connected with exchange. The rules are deployed using Rest-API provided by WSO2-Stream-Processor. All newly deployed rules(based on templates) will connect with RabbitMQ after RabbitMQ assigns a new queue/connection to each rule. So, on deleting the rules, the rules are getting partially undeployed and queues are not getting deleted which were assigned to rules. This problem is arising once in a while. On stopping and starting WSO2 SP server, the queues are getting deleted. The problem seems with connection object, it's not getting destroyed on deleting rules.
@prashantkt10 Could you describe more on how the rules are deployed? one rule is for multiple sp worker nodes? and each app will have different queues?
@Niveathika , one rule/app for single node. And one queue for each app/rule. As soon as, the rule is deployed, the rule creates a new queue and connects with RabbitMQ exchange. On deleting the business rule, the queue is not getting destroyed sometimes, either I delete the rules with REST API or from Business rules manager UI (https://localhost:9643/business-rules).
In the scenario when I'm facing issue, the UI is giving notification that "Rule got partially undeployed".
@minudika Seems business rules does not undeploy fully. Could you look into this?
@prashantkt10 What is the version of WSO2 SP you are using? Is it 4.3.0 or a 4.4.0 milestone?
@minudika , version 4.3.0
@minudika Any update on this?
@minudika , This is the error what I'm getting.
[2018-12-24 11:31:53,818] ERROR {org.wso2.siddhi.core.SiddhiAppRuntime} - Error on 'voltage-ca-highest-lt_0'. channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0) Error in shutting down source 'rabbitmq' at 'InputStream' on Siddhi App 'voltage-ca-highest-lt_0'. com.rabbitmq.client.AlreadyClosedException: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0) at com.rabbitmq.client.impl.AMQChannel.processShutdownSignal(AMQChannel.java:283) at com.rabbitmq.client.impl.ChannelN.startProcessShutdownSignal(ChannelN.java:267) at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:573) at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:509) at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:503) at org.wso2.extension.siddhi.io.rabbitmq.source.RabbitMQConsumer.closeChannel(RabbitMQConsumer.java:118) at org.wso2.extension.siddhi.io.rabbitmq.source.RabbitMQSource.disconnect(RabbitMQSource.java:375) at org.wso2.siddhi.core.stream.input.source.Source.shutdown(Source.java:161) at org.wso2.siddhi.core.SiddhiAppRuntime.shutdown(SiddhiAppRuntime.java:468) at org.wso2.carbon.stream.processor.core.internal.StreamProcessorService.undeploySiddhiApp(StreamProcessorService.java:244) at org.wso2.carbon.stream.processor.core.internal.StreamProcessorDeployer.undeploy(StreamProcessorDeployer.java:321) at org.wso2.carbon.deployment.engine.internal.DeploymentEngine.lambda$undeployArtifacts$3(DeploymentEngine.java:402) at java.util.ArrayList.forEach(ArrayList.java:1249) at org.wso2.carbon.deployment.engine.internal.DeploymentEngine.undeployArtifacts(DeploymentEngine.java:393) at org.wso2.carbon.deployment.engine.internal.RepositoryScanner.sweep(RepositoryScanner.java:105) at org.wso2.carbon.deployment.engine.internal.RepositoryScanner.scan(RepositoryScanner.java:68) at org.wso2.carbon.deployment.engine.internal.SchedulerTask.run(SchedulerTask.java:43) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)