Sending push content to many recipients

The BlackBerry MDS Connection Service lets you submit a single push request for many BlackBerry device users. You can send push content to many recipients by specifying:

  • Multiple email addresses or BlackBerry device PINs in the push request
  • A BlackBerry user group (which specifies many recipients using a single address) in the push request

BlackBerry Enterprise Server architecture features multiple distributed push servers. If a push request is received by a central push server that supports multiple recipients, and the push request is forwarded to a BlackBerry MDS Connection Service that does not support multiple recipients, then the central push server creates a push request for each address (or in the case of a group, each member address) specified in the original push request.

Sending content to multiple email addresses

Pushing content to multiple email addresses rather than to a BlackBerry user group allows you to cancel, query, or receive result notifications for individual recipients.

However, using multiple addresses can result in a large push request, which has some complications. For example, the Apache Tomcat server that comes with the Push Service SDK sample limits the total size of the URL and headers in an HTTP request to about 3KB. A BlackBerry push request that adds many recipient addresses to the query string might exceed this limit, causing the server to close the connection. To avoid this issue, the server-side push initiator should push to fewer recipient addresses at a time.

Push requests might be forwarded from a centralized push server to other BlackBerry MDS Connection Services for delivery using the BlackBerry push format. As a result, even if the original push request uses the PAP push format, the URL size limitation can cause a redirection error if enough destination addresses require redirection. The push initiator can either push to fewer recipient addresses at a time, or submit the push request directly to the BlackBerry MDS Connection Service to which the recipient addresses are mapped.

Using the PAP push format

When you use the PAP push format, you need to include an <address> element for each intended recipient. The address-value attribute specifies the email address or BlackBerry device PIN for the recipient, along with the application ID.

The following XML indicates that content should be sent to two BlackBerry device users specified by their email addresses (user1@blackberry.com and user2@blackberry.com).

<address address-value="WAPPUSH=user1%40blackberry%2ecom%5B%
  3A7874/TYPE=USER@blackberry.net" />
<address address-value="WAPPUSH=user2%40blackberry%2ecom%5D%
  3A7874/TYPE=USER@blackberry.net" />

All nonalphanumeric characters in the device email part of the address-value attribute, other than "+", "-", ".", or "_" must be URL encoded as hexadecimal values in the PAP control entity.

Using the BlackBerry push format

When you use the BlackBerry push format, you need to include a separate DESTINATION parameter for each recipient email address or BlackBerry device PIN in the query string.

The following URL indicates that the push request should be sent to two BlackBerry device users specified by their email addresses (user1@blackberry.com and user2@blackberry.com).

http://mds_server:8080/push?DESTINATION=user1@blackberry.com&
  DESTINATION=user2@blackberry.com&PORT=7874&REQUESTURI=/

Sending content to a BlackBerry user group

BlackBerry user groups represent multiple recipients that use the same address. Groups are controlled on the BlackBerry Enterprise Server, so users can be added or removed without changing the address of the group. This approach reduces the complexity of adding many individual addresses to a push request, and minimizes the size of the push request.

When you send a push request to a group, the BlackBerry MDS Connection Service considers the group to be a single entity, which can the inhibit flexibility of a push app. For example, if you submit a reliable push request for a group, you don't receive a result notification for each member of the group. Instead, the BlackBerry MDS Connection Service returns a single result notification for the entire group. If you use the PAP push format, you can't cancel or query the status of the push request for a particular group member.

The BlackBerry MDS Simulator doesn't support pushing content to groups, so you can't test pushing content to groups in a simulated environment.

Using the PAP push format

When you use the PAP push format, you need to include a single <address> element for the group. The address-value attribute specifies the group name.

To identify the value as a BlackBerry user group, you must prefix the group name with a URL encoded $ character (%24). The following XML indicates that the push request should be sent to a single group called Marketing.

<address address-value="WAPPUSH=%24Marketing/TYPE=
  USER@blackberry.com"/>

All nonalphanumeric characters in the device email part of the address-value attribute, other than "+", "-", ".", or "_" must be URL encoded as hexadecimal values in the PAP control entity.

Using the BlackBerry push format

When you use the BlackBerry push format, you need to add a DESTINATION parameter for the group to the request.

To identify the value as a BlackBerry user group, you must prefix the group name with a $ character. The following URL indicates that the push request should be sent to a single group called Marketing.

http://mds_server:8080/push?DESTINATION=
  $Marketing&PORT=7874&REQUESTURI=/

For the BlackBerry push format, the application ID can be passed in the PORT parameter.

Last modified: 2015-06-11



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus