简体   繁体   English

Mule群集配置问题

[英]Mule cluster configuration issue

I have a mule cluster with 2 nodes running in different machines, cluster configured through mmc with tomcat. 我有一个在2台节点在不同机器上运行的Mule集群,该集群通过带有tomcat的mmc配置。 when I deploy application in mmc cluster, applications are deploying 2 nodes. 当我在mmc群集中部署应用程序时,应用程序正在部署2个节点。 I have quartz scheduler, which runs nightly build. 我有石英调度程序,它每天运行一次。

<quartz:connector name="Quartz" validateConnections="true" doc:name="Quartz">
        <quartz:factory-property key="org.quartz.scheduler.instanceName" value="my-app1"/>
</quartz:connector>

<quartz:inbound-endpoint jobName="Fetch" repeatInterval="0" repeatCount="0" responseTimeout="10000" doc:name="Quartz" startDelay="0" cronExpression="${cronExpression}" connector-ref="Quartz">
            <quartz:event-generator-job/>
</quartz:inbound-endpoint>

Now, when application starts at 11pm, application is running in both the nodes. 现在,当应用程序在晚上11点启动时,两个节点上都在运行应用程序。 This causes duplicate of processing records ie processing same application in 2 machines. 这导致处理记录重复,即在2台机器中处理相同的应用程序。 Mule cluster is HA-Active-Active mode, what I need is at any given time only one node should process and if there is a huge load then other server should process it, even failure of one server should pickup the other server up and running. Mule集群是HA-Active-Active模式,我需要的是在任何给定时间仅一个节点应处理,如果负载很大,则另一台服务器应处理它,即使一台服务器的故障也应使另一台服务器启动并运行。 Instead of doing this, scheduler runs in both application in parallel. 调度程序没有这样做,而是在两个应用程序中并行运行。 How to avoid this. 如何避免这种情况。

In a cluster only one Quartz inbound endpoint should be triggered. 在集群中,仅应触发一个Quartz入站端点。 If this is not happening please open a support case with our support team. 如果这种情况没有发生,请与我们的支持团队一起打开支持案例。 About distributing messages under hight load, you should put a vm outbound endpoint after the quartz inbound endpoint and the rest of your flow logic in a different flow that listen to those messages in a vm inbound endpoint. 关于在高负载下分发消息,应将vm出站终结点放在石英入站终结点和其余流逻辑之后的其他流中,以侦听vm入站终结点中的那些消息。

If things does not work out, you can have a temporary workaround where , flow which has only the quarts endpoint and then a JSM queue which will send a nearly balanced messages to two nodes . 如果无法解决问题,则可以采用一个临时解决方法,其中flow仅具有夸脱端点,然后是JSM队列,该队列将几乎平衡的消息发送到两个节点。

Here the quarts and the JMS combination should be deployed only in one server. 在此,夸脱和JMS组合只能部署在一台服务器中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM