How to use the wso2 esb connector - wso2-esb

I have a question regarding to how to use the wso2 esb connector. I have just followed these steps: http://docs.wso2.org/display/ESB480/Using+a+Connector to get more information. Then I checked out the sample connector from: https://github.com/wso2/esb-connectors/tree/master/distribution/foo-connector to build and try to run this sample. After deploying successfully, I don't know how to use it. ESB. I am using wso2 esb 4.8.

Download the connector zip file from https://github.com/wso2/esb-connectors/tree/master/distribution
Add and enable connector as described in http://docs.wso2.org/display/ESB480/Managing+Connectors+in+Your+ESB+Instance
To add a connector:
On the Main tab in the ESB Management Console, under Connectors click Add.
Click Browse, specify the ZIP file, and click Open.
Click Upload.
The connector will now appear in the Connectors list and is ready to
be enabled in your ESB instance.
To enable a connector:
On the Main tab in the ESB Management Console, under Connectors click List to view your uploaded connectors.
Click Enable next to a connector you want to enable, and then confirm that you want to change its status. Repeat this step for each
connector you want to enable.
Use the connector as described in the doc (eg. Twitter Connector) within your ESB configuration.

I think the missing steps are to add a proxy to use connector, and visit the proxy to invoke the connector.

Related

Send WSO2 Carbon logs to RabbitMQ

My organisation is using RabbitMQ and ELK to collect and analyst log information. we also use WSO2 API Manager (1.10.0) as gateway and need to send log of AM to RabbitMQ somehow. Could anyone please give some advices on how to achieve or show me where the related documents are available. I found a fabulous article for publishing WSO2 carbon logs to ELK, https://udaraliyanage.wordpress.com/2016/06/19/publish-wso2-carbon-logs-to-logstashelasticsearhkibana-elk-using-log4j-socketappender/, but cannot find how to send logs to RabbitMQ.
Thanks,
Sean
AFAIK there is no out of the box method to publish logs to RabbitMQ.
But wso2 carbon allows adding custom log appenders. So you can write your own log4j appender (this is an example for a Rabbitmq log appender). After that add it to the wso2 product's log4j properties. You can follow this guide to write and add your own log4j appender to the wso2 product.
Hope this helps.

Mulesoft Anypoint studio will not install the AMQP connector

I want to use Mulesoft Anypoint studio to listen to some queues in rabbitMQ. But the latest version of Anypoint will not let me install the AMQP connector from the Anypoint Exchange suggested by several documentations. It will tell me Cannot complete the request see the error log for details. First of all I can not find the error log of the Anypoint Studio. But there is a hidden .log file in the workdirectory, but it also said See the error log for details.
Does anybody have a solution for this, or know what is wrong with the AMQP connector on the Anypoint Exchange?
When I want to install another connector like the MongoDB Connector, everything went ok.
You can install it as follows:
go to Help -> Install new software
select Anypoint Connectors Update Site
select Community -> Mule AMQP Transport
Try refreshing the Connector's update site following the steps below:
Go to Preferences
Select Install/Update --> Available Software Sites
Select the Connectors Update Site and clic option "Reload".

What is the use of Mule Agent?

could someone please help me what is the purpose of Mule Agent, how it works and what are the scenarios where we can use mule agent?
Thanks,
Venkat.
Mule agent is used to monitor and control Mule servers and as well as using Mule agent API you can
1) Controlling applications, domains and services
2) List, deploy, undeploy or redeploy domains
3) List, deploy, undeploy, get status of, start or stop applications
4) Publishing Mule metrics to external monitoring systems
For more details read the mule documentation
https://docs.mulesoft.com/mule-agent/v/1.1.1/

Mule ESB Instance Monitoring

what is the best way to monitor the Mule ESB instances. Is there a way i can get alerted when my mule instance goes down for some reason. I have 4 instances of Mule running and how will I come to know if 1 of them got down due to some reason.
Thanks!
I assume you are running community edition? (Enterprise edition provides a Management Console which allows you to define alerts). If you are using CE, then you are able to enable JMX monitoring on the instances and then use one of many ways to verify based on JMX info, whether your server is running. One way is to write your own application that retrieves JMX data programmatically and act accordingly.
HTH
If you are using Mule EE, you can use MMC to monitor all your instances as Gabriel has already suggested. My suggestion would be to install MMC inside tomcat on a separate server. This is to ensure that even if your Mule Server crashes or goes down, your MMC is still running and can send you alerts about your Mule server downtime. You can refer below link for details on how to setup server down and up alerts.
https://developer.mulesoft.com/docs/display/current/Working+With+Alerts
Additionally I would recommend to use MMC with database persistence to ensure you have ability to recover MMC workspace even if your MMC server crashes. You can refer about MMC setup with DB persistence at below link.
https://developer.mulesoft.com/docs/display/current/Configuring+MMC+for+External+Databases+-+Quick+Reference
If you don't have Mule EE, you may want to explore other tools or customer alerting applications as suggested by Gabriel.
HTH
You can set up a JMX agent by adding the following lines into your "conf/wrapper.conf" file :
wrapper.java.additional.19=-Dcom.sun.management.jmxremote
wrapper.java.additional.20=-Dcom.sun.management.jmxremote.port=10055
wrapper.java.additional.21=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.22=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.23=-Djava.rmi.server.hostname=127.0.0.1
don't forget to change the values accordingly. Also you can implement SSL authentication with a few extra lines.
Now once your monitoring platform is set up you can always activate Java pollers and start the server.

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.