Use the PushNotification.xml configuration file to define the
behavior of your Push Notification Bridge.
Configuring the Diffusion™ server
Consider the following when configuring the server connection:
- The URL to the Diffusion server must include both the prefix
for the transport that the bridge uses to connect to the Diffusion server and the port number that the Diffusion server accepts client connections on.
following transport prefixes are supported:
- The principal you use to connect to the Diffusion server must
have a role that includes the following permissions:
- select_topic and
permissions for all topics that the bridge sends push notifications
permission for the path that the bridge sends responses
You can define template notification messages within the configuration file that are
associated with one or more topics. When an update is received on a topic, the
associated template is used to format the update information into the JSON that is
passed to the push notification networks.
Because the templates are defined in an XML configuration file, ensure that the
configuration file remains valid by escaping any characters that are not valid XML.
(For example, use & to escape &.)
You can also specify that topic updates be passed to the push notification network
verbatim. In this case, it is the responsibility of the client or publisher updating the topic to ensure that the
update content is in the correct JSON format. If the update content is not in the
correct JSON format, the Push Notification Bridge logs an error.
If there is no matching template, verbatim relay is the default.
For more information about the JSON format of push notifications, see Push notification JSON format.
The Push Notification Bridge stores its data in memory. If you want the bridge to
persist the notification requests your clients set up after the bridge has
restarted, you must persist the data.
Use the persistence element to specify the implementation of the
API to use.
For more information about implementing a persistence solution for your Push
Notification Bridge, see Push Notification Bridge persistence plugin.