Can we have a way to integrate control-m with mule? - mule

We have a requirement where we want mule to be invoked with fixed frequency we want to utilise control-m for that.

If the Control-M agent is running on your Mule ESB server, then you can use it to invoke a script which uses curl to invoke an http inbound endpoint flow, or to send a JMS message for a Mule flow with a JMS inbound endpoint, or place a file in a directory for a file inbound endpoint, etc... You get the idea, right? Any of the inbound endpoints are a possible candidate for the kickoff. Whether you are running Mule under Windows or Nix is another question as well, but it will work either way with some mods as to the scripting approach.

Related

Some concept questions on Mulesoft

I have some questions on concepts of Mulesoft. If you could answer that would be appreciated.
1.When mule connects to an FTP server and checks for new files,does Mule by default deletes the file once it is downloaded? And can FTP is available both as polling and as event subscription based?
When we connect to a RESTful service over HTTP, can Dynamic endpoints select whether HTTP or HTTPS is used or can be used to set the Host, Port and Path? (multiple choice for this question: a. Dynamic endpoints can select what transport to use. b. The Host, Port and Path can be set using dynamic endpoint. c. Dynamic endpoint can select whether HTTP or HTTPS is used. Which one is correct?)
in configuration, if
is used, does it mean my1.properties will take precedence?
Thanks!
1a) Community FTP connector will always delete the remote file. Enterprise FTP connector allows you to move it to another folder.
1b) Reading FTP connector is only available as a polling mechanism to read files from a FTP server.
2) The only part that can not be dynamic is the scheme, but you could place two connectors (one for HTTP and another for HTTPS) inside a choice and select which one to use dynamically.
3) I didn't get this, please elaborate a bit more.
HTH,
Marcos
Yes, it does. Mule EE give more features as you can see in the documentation FTP is always polling the directory.
You can setup HTTP or HTTPS. But, you can use a composite-source and tell that your flow is available for HTTP and HTTPS.
I know that it is possible, I found time ago the same requirement for FTP in mule forum. Hope this help
<!-- streaming to prevent deleting remote file -->
<ftp:connector name="ftpConnector" streaming="true" />
<flow name="ftpBridge">
<vm:inbound-endpoint path="fetchFtpFile" exchange-pattern="request-response"/>
<scripting:component>
<scripting:script engine="groovy">
def ftpFileUri = "ftp://${payload.userName}:${payload.password}#${payload.host}${payload.path}?fileNameFilter=${payload.fileName}"
muleContext.client.request(ftpFileUri, 30000L);
</scripting:script>
</scripting:component>
</flow>
If you want to load properties you can use spring to do that. Review this link.

How can I test a flow with ActiveMq in local

I'm started to work with Mule and Mule Studio (version 3.5): my goal is rewriting some flows that now is workign, but with a bad syntax.
In this moment I have a flow with some JMS connector and JMS endpoint for acquiring data (my flows are using ActiveMQ 5.10): the configuration XML file is ok and I want to test this flow, but I have'nt a big experience in JMS and system integration.
I think to create a JMS producer and, into run,
start up Mule (with all his flows, endpoints, etc, JMS queues);
start the JMS producer: in run the producer
links to name queue defined in configuration Mule
create a message
send this message to Mule
And the test asserts the
Mule receive the message by the producer
Mule don't loss the message
Mule turn this message to correct flow and relative elaboration
My problem is the lack of manuality and pratical work-ability to link Mule and producer: I tried to use http://activemq.apache.org/hello-world.html but the code is useless for me because it work correctly without Mule, but in my case the tests has to fail if Mule is stopped.
Has everybody any suggest, please?
Just set up an activemq connector without addresss, that will use the default address of vm://localhost that instructs the connector and activemq to act as a local embedded server.
<jms:activemq-connector name="JmsConnector" specification="1.1" />

Mule ESB and Throttling

IN the following link:
http://www.mulesoft.org/documentation/display/current/Mule+ESB+3.4.0+Release+Notes
I see the following
EE-3141 When using a Throttling policy with throttling statics enabled, limit headers are swapped.
However, I can find no example of throttling policies within Mule ESB, but there is possibly a throttling policy within the Anypoint API Manager
Could someone please provide a link to how to use a Throttling policy within Mule ESB?
Thanks
To achieve correct Throttling behaviour you can follow below steps:
Configure a queue (for example, a persistent VM or a JMS queue to avoid message lost during the Mule server crash) after your inbound endpoint.
Configure scheduled delay, for example AMQ_SCHEDULED_DELAY in case of ActiveMQ, to a desired value. If the queue does not support scheduled delay, then we need to find our way to achieve the delay, probably using a Java component.
Finally, configure the outbound endpoint.
The Throttling module (which can be configured as throttler or rate limiter) comes out of the box with any Mule API Gateway distribution. Mule EE comes with a light weight version of it. If you are using Anypoint API Platform, then you don't need to pay attention to the internals of how it is being done: Simply apply/unapply the policy to your managed API and it will work like a charm.
Even i tried implementing the Throttling concept in mule flows. There is no exact way of implementation for this , but i was able get that nature into the flows using the receiver thread profiling at inbounds and dispatch threading profiles on outbound connectors.

Starting the mule without mule-config.xml and to load the mule-config programatically

I am having a requirement like interacting the mules from different machines.I used the tcp inbound endpoint it is working perfectly if I configure everything in the mule-config.xml.Now my problem is i dont want to use the mule-config.xml but I want to load it programmatically.if any one have the solution pls update..
Thask.
The whole point of using Mule is that you can configure your flows simplistically, rather than writing complex code yourself. Having said that you can programmatically configure endpoints provided they are
outbound endpoints.
OR you using mulerequester:request
You cannot programmatically configure inbound endpoint.

How to configure a running Mule service's properties dynamically?

I would like a recommendation/idea on a method to configure properties for a running Mule service dynamically, i.e. I want the service to pick up the new settings without the need to restart Mule. Typically the kind of properties/settings I would like to change are FTP connector user ID, passwords, service URLs etc.
Any idea would be welcome.
Regards, Ola
Use the URI endpoint format do dynamically address endpoints. In simple cases you may be able to use the message properties in a TemplateEndpointRouter
Otherwise You need to write a component that composes the URI and sends the message to the dynamic endpoint using the MuleEventContext or MuleClient.
See here:
http://www.mulesoft.org/documentation/display/MULE2USER/Outbound+Routers#OutboundRouters-TemplateEndpointRouter
http://www.mulesoft.org/documentation/display/MULE2USER/Using+the+Mule+Client#UsingtheMuleClient-PerforminganEventRequestCall
http://www.mulesoft.org/documentation/display/MULE2USER/Mule+Endpoint+URIs
Mule exposes all service configuration via JMX, but I don't see any obvious way to reconfigure the connectors without a restart. They are internally managing pools of connections.
If there is a limited, you can create connectors for each and reconfigure the routes via jmx attributes.
If it is to be fully dynamic you likely need to implement your own service component to manage the ftp connection. Exposing the connection management, configuration, and restarting via JMX should be pretty straight forward.