Question

Am able to set-up a cluster as per mule documentation using mule-ha-bundle-2.0 but with two nodes in two different machines connected in the same network and can deploy a flow having vm and logger as below.

<flow name="vmc-flow" doc:name="vmc-jc-flow">
    <vm:inbound-endpoint exchange-pattern="one-way"
        path="vmq1" doc:name="vmq1-listner" />
    <logger
        message="Request hit to server: #[server.host] at time: #[server.dateTime] from the flow: #[flow.name] with payload: #[payload] and message id : #[message.id.toString()]"
        level="INFO" doc:name="log-info" />
</flow>

now my question is: how to push messages to that particular vm-queue?

I have a used another (below) mule application which is again deployed on the same cluster but those are not consumed by the listener 'vmq1'

<spring:beans>
    <context:property-placeholder location="test-cluster-app.properties" />
</spring:beans>

<flow name="test-vmc-invoke" doc:name="test-vmc-invoke">
    <http:inbound-endpoint exchange-pattern="request-response"
        host="${http.host}" port="${http.port}" doc:name="HTTP" path="${http.path}" />
    <expression-filter expression="#[payload !='favicon.ico']"
        doc:name="filter-favicon" />
    <set-payload value="#[string:from http]" doc:name="set-payload" />
    <logger
        message="sending message to vmq1 at time #[server.dateTime], flow #[flow.name]"
        level="INFO" doc:name="log-info" />
    <vm:outbound-endpoint exchange-pattern="one-way"
        path="vmq1" doc:name="vmq1-dispatcher">
    </vm:outbound-endpoint>
</flow>

Note: Am able to hit the http and push messages to 'vmq1'

Please help me in understanding where am i going wrong.

Était-ce utile?

La solution

From the user guide: http://www.mulesoft.org/documentation/display/current/VM+Transport+Reference#VMTransportReference-Considerations

WARNING

Each application in a Mule instance has its own, unique set of VM endpoints. Thus the VM transport cannot be used to communicate between different Mule applications.

Therefore, you can not use VM endpoints to establish inter-application communications. Use JMS endpoints instead.

Autres conseils

Here you can find the link on how to use Shared Resources in different Mule apps.

Only the following connectors and related specifications can be specified as shared resources at this time: HTTP/HTTPS VM JMS JMS Caching Connection Factory Database WMQ JBoss Transaction Manager Bitronix Transaction Manager

Please note that the VM transport is an enterprise feature. Nevertheless the other types might be useful for your case too, for instance HTTP, or JMS.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top