Authorizing client messaging
You can use messaging policies to authorize client messaging. There are three types of messaging policies: Topic policies, queue policies, and subscription policies.
Topic policies can be used to authorize publishing or subscribing to a topic. Queue policies can be used to authorize sending, receiving, or browsing a queue. Subscription policies can be used to authorize the creation and deletion of global-shared durable subscriptions, or the authorization of a subscriber to receive messages from a global-shared durable subscription.
When you create a messaging policy, you specify a set of allowed actions for a particular topic string, queue, or subscription. The messaging policy specifies which clients can use those actions, based on criteria such as client ID, or IP address.
-
Topic: * Action: Subscribe MaxMessages: 10
-
Topic: A Action: Subscribe MaxMessages: 5
B
allows 10 messages to be buffered at a time. A subscription on topic A
also allows 10 messages to be buffered at a time, as the more permissive messaging policy is defined first. To restrict the subscriptions on topic A
to buffer only five messages, you must change the order of the policies.A messaging policy can be applied to more than one endpoint. The messaging policies that are associated with the endpoint that a client is connected to are applied after the connection policies are applied.
- MaxMessages
- MaxMessagesBehavior
- DisconnectedClientNotification
- MaxMessagesTimeToLive (for messages that are published or put after the change is made)
Wildcard based destinations
You can grant messaging authorization to a wildcard based topic, queue, or global-shared durable subscription by using an asterisk (*) in the Topic, Queue, or Subscription field.
ARCHITECTURE
AN/APPLE
A/C/E
A/B/C/D/E
DEVICE/clientID/LOCATION
DEVICE/clientID/FAULT
DEVICE/clientID/UPGRADE
DEVICE/${ClientID}/*
DEVICE/${ClientID}/LOCATION
DEVICE/${ClientID}/FAULT
DEVICE/${ClientID}/UPGRADE
DEVICE/*
*/${ClientID}/*
NOTIFY/UserID/ClientID/NOTIFICATION
NOTIFY/${UserID}/${ClientID}/NOTIFICATION
NOTIFY/*/*/NOTIFICATION