Configuring Agent Broker
Agent broker handles WSO2 Common Events, It can be used to publish and receive events over Thrift using TCP, SSL, HTTP, and HTTPS, and it can also receive JSON events via HTTP and HTTPS.
WSO2 Complex Event Processor is shipped with an Agent Broker which will be used to receive fired events and handover them to CEP using Local Transport. From CEP we can send output events to any other Agent Server using Thrift over TCP, SSL, HTTP, or HTTPS.
Note
Only the Agent Broker that is shipped with CEP can be used to receive incoming events, but CEP can send output events to any (including external) Agent brokers.
Info
By default there will be an Agent server started with CEP, and its default ports are as follows;
tcp port : 7611 ssl port : 7711 http port : 9763 https port : 9443
Configuring through User Interface
- Sign In. Enter your user name and password to log on to the Complex Event Processor Management Console.
- Click on "Configure" section of the left panelÂ
- Then click on "Add" menu item under "Broker" Menu
You will get a page with header "Create a New Broker" and here you can configure new broker configurations Enter the following details in the form to create an Agent broker
Broker Name : agentBroker Broker Type : agent Receiver URL : tcp://localhost:7611 (Here we assume you started an Agent Server at 7611 to have this URL) Authenticator URL: ssl://localhost:7711 User Name : admin Password : admin
Note
For secure data transfer use ssl or https for both Receiver URL and Authenticator URL of the Agent Broker. In the normal case Authenticator URL can be of ssl or https and Receiver URL can be either of tcp or http.
Once you click on the "Add Broker" button, you will be directed to the Available Brokers page.
Available Brokers page allows you to view the broker configurations by clicking on the broker name and delete brokers by clicking on delete button.
Configuring through configuration file
Broker management configuration can be provided via broker-manager-config.xml. These configurations will be loaded at server start-up.
- Open broker-manager-config.xml which is at <CEP_HOME>/repository/conf
Enter the following Agent broker configurations inside the "brokerManagerConfiguration" element as below
<brokerManagerConfiguration> .. <brokerConfiguraton name="agentBroker" type="agent"> <property name="receiverURL">tcp://localhost:7611</property> <property name="authenticatorURL">ssl://localhost:7711</property> <property name="username">admin</property> <property name="password">admin</property> </brokerConfiguraton> .. .. </brokerManagerConfiguration>
Â
Â