Managing Event Publishing with WSO2 Data Analytics Server
This sections explains how to configure WSO2 Data Analytics Server (WSO2 DAS) with WSO2 EMM in a production environment, to publish events. Follow the steps given below:
- Port offset WSO2 DAS by 1 and start the server. There are two ways to set an offset to a port:
Pass the port offset to the server during startup. The following command starts the server with the default port incremented by 1.
./wso2server.sh -DportOffset=1
Set the Ports section of the
<EMM_HOME>/repository/conf/carbon.xml
file as follows:<Offset>1</Offset>
Once you have port offset start WSO2 DAS using the following command../wso2server.sh
- Configure the
device-analytics-config.xml
file that is in the<EMM_HOME>/repository/conf/etc
directory.Enable the settings by assigning
true
as the value within the<Enabled>
tag.ReceiverServerURL
: The URL must be in theprotocol://hostname:port
format. Since you port offset WSO2 DAS, make sure to update the port accordingly.
Example:tcp://localhost:7611
if you have not port offset andtcp://localhost:7611+n
if you have port offset by n.AdminUsername
: Provide the administrator username. The default username isadmin
.AdminPassword
: Provide the password of the administrator. The default password isadmin
.
Example: Single receiver
<AnalyticsConfiguration> <Enabled>true</Enabled> <ReceiverServerUrl>tcp://localhost:7612</ReceiverServerUrl> <AdminUsername>admin</AdminUsername> <AdminPassword>admin</AdminPassword> </AnalyticsConfiguration>
Configure the
<EMM_HOME>/repository/conf/analytics/analytics-data-config.xml
file to specify the data service access mode and the URL.There are three data service access modes, such as
LOCAL
,REMOTE
andAUTO
. WSO2 EMM only supports theREMOTE
mode.In the REMOTE mode the Analytics API only accesses the Analytics Data Services OSGI service in a remote instance. This mode is suitable when the node is a lightweight node and does not contain an Analytics Data Services OSGi service. Fore more information on the configurations that need to take place after the node is set, see WSO2 DAS documentation on configuring the connection related parameters.
- Provide the URL of WSO2 DAS after it was port offset.
Example:
<AnalyticsDataConfiguration> <!--Mode can be either as LOCAL, REMOTE or AUTO. If LOCAL mode is configured the analytics api will lookup --> <!--necessary services within the the same node, and will invoke then directly without going through network.--> <!--But If the current node is a light weight node, and doesn't have analytics data services, --> <!--then the mode should be configured as REMOTE. If AUTO mode is configured, based on the data service availability it will automatically switch the mode with LOCAL and REMOTE --> <Mode>REMOTE</Mode> <!--Note: The following parameters will be used only when the mode is configured to REMOTE.--> <!--The URL of the analytics data service is being hosted--> <URL>http://10.10.10.189:9764</URL> </AnalyticsDataConfiguration>
Creating an event stream and receiver.