0
votes

The following scenario is given:

  1. /Collection1 (a number of users are subscribed to this collection)

  2. /Collection1/ new Leaf1 (a user creates a child leaf node)

    ->all subscribers will be notified of the new child.

  3. /Collection1/Leaf1/new item (a user publishes an item in the newly created Leaf1)

Is it possible to configure the Collection node so that all subscribers of this Collection1 node will be notified of new published items in the Leaf1 node?

I only see notifications for a subscriber (subscr1) of the parent collection1 node when a new leaf1 node is created. But if another user publishes an item, the subscriber "subsc1" will not be notified because he is not directly subscribed to the new Leaf node. Can subscr1 become a subsciber of the newly created node automatically to receive notifications of Leaf1?

I actually set the var "pubsub#deliver_payloads" to 1 for collection1 and Leaf1. But the subsc1 don't even receive the notifications (also without payload) when items are published in the Leaf node.

As I understood pubsub all the subscribers of the Collection node should be notified when items will be published in the child nodes (the notifications will be propagated upwards).

1

1 Answers

1
votes

You have to configure your subscription to be of type items

pubsub#subscription_type=items

The fact that you are now getting notified when the leaf node is added means the subscription is configured to be of type nodes. This will only provide notification of addition, deletion and configuration change of leaf nodes.

If you want to be notified in both cases then you simply create another subscription.