Troubleshooting Regular Expression Subscriptions

When a regular expression subscription does not receive the messages that it expects, the two most common reasons are:

  • The regular expression does not match the topic, or topics, expected; or

  • The user submitting the subscription is not entitled to one or more of the expected topics

As with any other subscription, it would also be important to verify that the messages match any content or entitlement filters in place, and that messages are actively being published to the topic in question.

Troubleshooting Whether Topics Match

To determine whether the regular expression matches the topic in question, use an external regex tester to verify that the regular expression matches the topic names that the subscription intends to subscribe to. Keep in mind that AMPS regular expression matches are not limited to the beginning of the topic name unless the expression contains an explicit anchor (that is, ^).

Troubleshooting Entitlement Issues

There are two ways to troubleshoot entitlement issues:

  1. An entitlement module will typically log whether it allows or denies an entitlement request. Check the AMPS logs for logging indicating whether the entitlement request was allowed or denied. Since AMPS caches the results of entitlement requests, using amps-grep to quickly scan the logs for the name of the topic is recommended.

  2. With a connection logged on with the same credentials as the user, enter a subscription with the exact name of the topic in question. That is, rather than using a regular expression subscription, supply the literal topic name on the subscription request. In this case, AMPS will refuse the subscription and log an error if the user is not entitled.

In either case, if the user is not entitled to a topic that matches a regular expression subscription, no messages from that topic will be delivered to the user.

Last updated

Copyright 2013-2024 60East Technologies, Inc.