Subscription Task
-
A Data Subscription is a task that automatically sends certain documents to a subscribed client, called the "subscription worker".
-
This page explains how to create a subscription task on the server side using the Studio.
-
In this page:
Subscription Task Definition
Subscription Task Definition
-
The RQL query that selects which documents the subscription sends to the client.
-
Define the starting point from which to send the first batch:
- Begining of Time (default option)
All documents matching the RQL query will be sent, regardless of their creation time. - Latest Document
Start from the first new document that will be created after the subscription is created. - Change Vector
Specify a document change vector as the subscription starting point.
- Begining of Time (default option)
-
Choose which node will perform this task by default.
-
Test the subscription query.
Testing
Testing Subscription
Testing the subscription shows which documents match the specified query.
-
Limit the number of results to retrieve for this test.
-
Limit how long - in seconds - the test should continue before stopping automatically.
-
Run the test.
Details in Task List View
Task List View
Click the info button on a task in the task list view, to see more detailed information.
-
Task Details Panel
- Task status -
Active: status isActive
while a subscription worker is connected to the task.
Not active: status isNot-active
when no workers are connected. - Mode -
Single: mode isSingle
if the subscription strategy allows only one worker to be connected at a time.
Concurrent: mode isConcurrent
if the subscription strategy allows only workers that use theConcurrent
strategy to connect. - Client URI - the identifier of the subscription worker subscribed to this task.
- Connection strategy - determines the workers connection strategy.
- Change vector for next batch - the change vector of the last document that was sent in the last batch.
- Last batch acknowledgement time - the last time a worker responded that it has received a batch.
- Last client connection time - the last time a worker communicated with or pinged the server.
- Task status -
- Database Group Topology
Concurrent Subscriptions
When Concurrent Subscribers are connected to a subscription task, they are all listed on the task details panel.
Concurrent Subscribers
- Each concurrent subscriber can be disconnected individually.
- Refresh the view to see changes in workers connection states.