What is the Axeda Compatibility Package? > What is the eMessage Connector?
What is the eMessage Connector?
The eMessage Connector allows Axeda assets that use the eMessage protocol (Axeda Gateway and Axeda Connector) to work with ThingWorx Platform. The eMessage Connector is comprised of the core ThingWorx connection server and the Axeda Adapter, which translates Axeda eMessage messages into messages that the ThingWorx Platform can act on and messages from the ThingWorx Platform that the eMessage agents can act on.
If your assets are running Axeda Gateway or Axeda Connector Agents, you can use the eMessage Connector to enable them to connect to and communicate with ThingWorx. Once connected, you can take advantage of ThingWorx Composer and ThingWorx Mashup Builder to create web-based applications for your assets. In addition, you can access your devices through ThingWorx Utilities.
The eMessage Connector supports multiple features of the Axeda Gateway and Axeda Connector Agents. Click to view information for each of the following features:
Registration Messages 
Axeda agents must be configured to communicate with the eMessage Connector in order to communicate with ThingWorx.
An Axeda agent sends an initial registration message that identifies itself based on its model and serial number, either as configured by you, or supplied as part of a migration process from the Axeda Platform. The eMessage Connector uses the model and serial number information to check that a corresponding Axeda entity for the agent asset exists in ThingWorx. If no corresponding entity is found, registration fails. If an entity is found, the asset is authenticated and registration succeeds. Upon confirmation, the asset is registered with ThingWorx. For managed assets, the registration process is used to establish and maintain the list of assets that are managed by an Axeda Gateway agent.
* 
Axeda agents include a list of scripts and their status (enabled/disabled) in their registration messages. The eMessage Connector captures this list as an infotable and makes it available as a property of the Thing that represents the agent asset in ThingWorx.
The date and time of the registration message sent to the ThingWorx Platform will always reflect the time on the eMessage Connector host, which is the date and time that the registration message was received from the eMessage agent, not the date and time that it was sent by the agent.
Ping Messages 
The Axeda agent is configured to contact the eMessage Connector after a configured amount of time passes (for example, 60 seconds), to let the Connector know that it is alive and available. This configured amount of time is referred to as the ping rate for an Axeda agent. Ping messages are used only if an agent has not communicated with the Connector (idle) for longer than the ping rate. Whenever the asset communicates, its time counter is reset. If, for example, the asset sends a change in the value of a property (data item), the time counter is reset. If you need to change the ping rate temporarily (until the Agent next restarts), refer to Setting the Ping Rate.
Data Item Messages 
Data items on Axeda agents represent discrete units of measure (for example, a temperature) and other characteristics of the assets where the agents are running. In ThingWorx, data items are referred to as properties of the Axeda Thing that represents a given asset. Incoming data item messages include the identification information necessary to ensure updating the appropriate Thing. Any issues with locating the entity, with the data quality, and other errors trigger notifications.
Alarm Messages 
In ThingWorx, alarms are represented as properties of Base Type INFOTABLE on the Thing that represents a deployed Axeda asset. Incoming alarm messages include the identification information necessary to ensure that the appropriate Axeda Thing is updated in ThingWorx. These messages also include any data items associated with the alarm (as part of the Agent configuration). These associated data items update the values of their corresponding properties on the Axeda Thing.
Event Messages 
In ThingWorx, events are also represented as properties of BaseType INFOTABLE on the Thing that represents a deployed Axeda asset. Incoming event messages include the identification information necessary to ensure that the appropriate Axeda Thing is updated in ThingWorx. They also include the name of the event, the associated message, severity, and timestamp.
You may want to subscribe to the property update event on the assetLogEvents property to be notified that an Axeda agent has sent an event message.
Egress 
Egress supports actions such as updating data items and transferring files. Data item updates are handled using properties with remote bindings, which can be written to the Axeda agent asset. Any egress property/data item messages for an asset are queued up and sent to the asset when it next contacts the eMessage Connector. Similarly, for file transfers, the Connector contacts the File Transfer Subsystem to determine if any file transfers are pending.
Edge-Controlled Egress 
The Axeda eMessage agents poll a platform to initiate communications. If it has a message to send to an eMessage agent, a platform must wait until the next time that the agent contacts the platform before it can send the message. Edge-controlled egress has been added to support this method of communication. You can control certain aspects of the interaction between the eMessage Connector and ThingWorx through configuration parameters for the Connector. Refer to Limiting Edge-Controlled Egress and Concurrent File Transfers
File Transfers 
To handle file transfers to and from assets running Axeda agents, the File Transfer Subsystem of the ThingWorx Platform supports queueing of file transfer jobs. If an Agent is not connected and a file transfer is initiated, the file transfer is queued and will execute only when the Agent is connected.
The Copy service of the File Transfer Subsystem can initiate file transfers (uploads and downloads). This service has a property that needs to be set to specify whether a transfer is “queue-able”. The default value of this property is false. For file transfers with Axeda agents, make sure that it is set to true.
In addition, agent-initiated file uploads are also supported. The eMessage Connector provides a configuration property that enables the Connector to request an overall checksum on a file to be uploaded to the ThingWorx Platform. By default, the eMessage agents do not calculate an overall MD5 checksum. Instead, they calculate checksums on chunks.
As of v.1.2.0, the eMessage Connector enforces the maximum size of files to be transferred that is set for the File Transfer Subsystem of the ThingWorx Platform. For information about restricting the maximum size of a file to be transferred, refer to Restricting the Maximum File Size for File Transfers.
For more information about transferring files and using the micro-service, refer to the section, File Transfers. For information about requesting an overall MD5 checksum (property is requireOverallMD5), refer to Configuring Additional Properties for File Transfers.
Scripts 
The eMessage Connector and ThingWorx Platform provide limited support for Axeda agent scripts. You can download scripts to Agent assets, register and unregister scripts, and run scripts. The results of the script execution are provided in an event, to which you can subscribe to view the results. Refer to Running Scripts for details.
Software Content Management (SCM) Support 
As of v.1.1.0, the eMessage Connector supports SCM messages. Users of the SCM module in ThingWorx Utilities can create instruction-based packages that download files, execute a script on the agent device, and restart the agent on the device. Compression is supported for downloading tar.gz files that the agents can extract. You can specify a hard or soft restart of the agent. As with package instructions in Axeda Platform, the Restart instruction must be the last instruction. For more information on using SCM, refer to the ThingWorx Utilitlies Help Center on the PTC Support site.
Support for the Axeda Deployment Utility 
As of v.1.2.0 of the eMessage Connector, the Connector responds to requests from the Axeda Deployment Utility. Note that the Deployment Utility makes requests by proxying those requests through the agent. It will never directly talk to the eMessage Connector. Instead, it sends the request to the agent, which in turn generates a request to the eMessage Connector.
The eMessage Connector can return only the device information that is supported by the ThingWorx Platform. The ThingWorx Platform does not support the Organization, Location, Region, and System concepts of the Axeda Platform, so the eMessage Connector cannot set or return this information to the Deployment Utility. The Connector can return the ThingName for each device. However, it cannot set the Agent Name because the ThingName cannot be changed on the ThingWorx Platform. If you set this information in the Deployment Utility, the eMessage Connector will ignore the request. If you attempt to retrieve this information, the eMessage Connector returns empty requests.
* 
If the agent Thing has not yet been created on the ThingWorx Platform or if the ThingName cannot be retrieved for the model and serial number, the Name returned by the Connector will be blank. If a blank Name field appears in the Deployment Utility, it means that a Thing does NOT exist on the platform for the agent device.
Remote Access 
The eMessage Connector forwards and stores information about the remote interfaces that the Axeda agents send to the ThingWorx Platform upon registration. This information includes the type of remote sessions supported, any related properties (for example, port number), and connection information for a device. The eMessage Connector communicates with Axeda Global Access Servers to manage requests for remote sessions. For information about remote access that applies to all types of agents, refer to Remote Access for Axeda Agent Assets through ThingWorx. For information specific to eMessage Agents and Axeda Global Access Server, refer to Remote Access for Axeda eMessage Agents through ThingWorx.
Support for PTC Axeda Policy Server 
As of v.1.4.0 of the Axeda Compatibility Package and v.1.3.0 of the eMessage Connector, support for control of remote sessions via Axeda Policy Server is provided. At this time, other activities that Policy Server can control, such as file transfer requests, are not supported by the eMessage Connector. When a ThingWorx user sends a request for a remote session to an Axeda Gateway or Axeda Connector Agent, the Agent checks for a policy file. If it finds the file, the Agent checks whether it is allowed to always perform a remote session, must request permission for the remote session, or can never perform it (denied). If the policy is to ask permission, the Agent sends the request for permission to Policy Server and another message to the platform that it is waiting for permission. Once permission is granted, ,the Agent performs the action and notifies the platform. If permission is denied, the Agent does not perform the action and notifies the platform accordingly.
If the policy is to always allow the action, the Agent performs it. Similarly if the policy is to never allow, the Agent sends a message to the platform that the request was denied by Policy Server.
The changes in the Connector and the ThingWorx Remote Access Extension (RAE) for this support affect how remote sessions are handled. For more information, refer to Using Axeda Policy Server with the eMessage Connector.
Security and the eMessage Connector 
Application keys and token authentication are used to secure communications between:
The eMessage Connector and ThingWorx Platform (application key authentication).
Axeda assets and ThingWorx Platform (token authentication).
Application Keys
As part of configuring the eMessage Connector, you generate an application key on the ThingWorx Platform. This application key is set into the Connector’s configuration, and is used to authenticate requests that are made by the Connector against ThingWorx Platform. To protect the application key, it is strongly recommended that you encrypt the configuration file of the Connector.
Both the value of the application key, and the user account under which the key was generated, are used by the ThingWorx Platform to determine if the requested action is permissible or not. For example, if the key is a match, but the user account associated with the key does not have sufficient permissions, the request is denied. To protect the application key, it is strongly recommended that you encrypt the configuration file of the Connector.
Tokens
Tokens are used to authenticate requests from Axeda assets against the eMessage Connector. Upon startup, the agent itself generates a token and includes it in the registration message and in each subsequent message that it sends to the eMessage Connector. After the Connector forwards the registration message (first message) to the ThingWorx Platform, the token value is stored as a property on the Axeda entity in ThingWorx and used to authenticate the agent on subsequent messages. The default name of the property is token.
When the eMessage Connector receives any requests from an Axeda asset, the model and serial number, either as configured by you, or supplied as part of a migration process from the Axeda Platform, are used to locate the corresponding Axeda entity. If no match is found, the request cannot be processed. If a match is found, the token that accompanies the message is compared to the known value to determine if processing can continue.
It is also possible to force a token to be “pre-provisioned” by clearing the check box for the parameter, Update Token on First Message, in the TokenPropertyAuthenticator configuration. In this case, if no value is sent up for a token, no match will be found and the request cannot be processed. For information on setting this parameter, refer to Configuring the TokenPropertyAuthenticator (eMessage Connector).
* 
Currently, a subscription to the token property exists on the DataChange event in the Axeda.Asset Thing Shape. This subscription invokes the process to clear the authentication result from the cache on the eMessage Connector. At this time the property name is token. If you create another property to hold the token value, you need to create a new subscription on the DataChange event and point it to the name of the new property. The new subscription needs to ensure that the authentication result is cleared from the cache.
For more information on how the TokenPropertyAuthenticator validates tokens, refer to TokenPropertyAuthenticator Behavior (eMessage Connector).
Limitations 
The eMessage Connector functionality has the following limitations:
In ThingWorx, Things have an identifier field. If a user sets the identifier for an eMessage Thing from ThingWorx Composer, the Connector cannot identify the device and rejects any message that contains an identifier. The eMessage device will no longer be able to connect to the ThingWorx Platform.
Only the features of Axeda agents that are described in this section are supported. If not described in this section, the feature is not supported.
In certain circumstances in a Linux environment, the eMessage Connector may require 30720 file descriptors. For details, refer to the topic,.Connector Exception: Too many open files (Linux).
Was this helpful?