Just a second...

Configuring your Push Notification Bridge

Use the PushNotification.xml configuration file to define the behavior of your Push Notification Bridge.

Configuring the Diffusion™ server connection

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.
    The following transport prefixes are supported:
    • ws://
    • wss://
    • http://
    • https://
  • The principal you use to connect to the Diffusion server must have a role that includes the following permissions:
    • select_topic and read_topic permissions for all topics that the bridge sends push notifications for.
    • send_to_session permission for the path that the bridge sends responses through.
    • register_handler permission

Configuring templates

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.

Configuring persistence

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 com.pushtechnology.diffusion.pushnotifications.persistence API to use.

For more information about implementing a persistence solution for your Push Notification Bridge, see Push Notification Bridge persistence plugin.

Configuring authentication

The Push Notification Bridge must authenticate with the push notification network you are using. Google Cloud Messaging uses an API key to authenticate your requests. Apple Push Notification Service uses a certificate. You must acquire these credentials before you can configure your Push Notification Bridge to use the push notification network.

For more information about getting the required credentials, see Getting an Apple certificate for the Push Notification Bridge and Getting a Google API key for the Push Notification Bridge.