Publisher-Subscriber Queue Provisioning
Methods and systems related to implementations of provisioning publisher-subscriber queues are described. The implementations include receiving, by a computing apparatus, a data queue request from a publisher. The computing apparatus may generate at least one of a publisher data queue, a publisher information queue, or an access queue. The computing apparatus may further control access to the publisher data queue based on the access queue and the publisher information queue.
1 . A method for provisioning publisher-subscriber queues, comprising:
receiving, by a computing apparatus, a data queue request from a publisher;
generating, by the computing apparatus, a publisher data queue based on the data queue request;
updating or generating, by the computing apparatus, a publisher information queue comprising a specification of the publisher data queue;
updating or generating, by the computing apparatus, an access queue comprising one or more access restrictions of the publisher data queue; and
controlling, by the computing apparatus, access to the publisher data queue based on the access queue and the publisher information queue.
2 . The method of claim 1 , wherein the data queue request comprises at least one of an entity name of the publisher, a name of the publisher data queue, an access restriction of the publisher data queue, a format of payload of the publisher data queue, or an expiration time of a message of the publisher data queue.
3 . The method of claim 1 , further comprising:
obtaining a Uniform Resource Locator (URL) for the publisher data queue; and
transmitting the URL to the publisher based on a name of the publisher data queue and an entity name of the publisher.
4 . The method of claim 1 , wherein the controlling of the access to the publisher data queue based on the access queue and the publisher information queue comprises:
receiving, from a subscriber, a queue access request for accessing the publisher data queue;
performing validation on the subscriber based on the access queue; and
granting the subscriber the access to the publisher data queue in response to a determination that the validation is successful.
5 . The method of claim 4 , wherein the queue access request comprises at least one of a URL of the publisher, a user identifier (ID) of the subscriber, a last access key associated with the publisher data queue, a timestamp of the queue access request, or a notification method.
6 . The method of claim 4 , further comprising:
updating or generating a notification queue based on the queue access request, the notification queue containing one or more notification methods for a message of the publisher data queue; and
notifying the subscriber based on the notification queue.
7 . The method of claim 4 , further comprising:
reprocessing the queue access request using a last key associated with the subscriber with respect to the publisher data queue in response to a determination that an issue of the access occurs.
8 . The method of claim 4 , wherein the controlling of the access to the publisher data queue based on the access queue and the publisher information queue comprises:
determining a type of the publisher data queue based on the access queue;
in response to a determination that the publisher data queue is a public data queue, inserting the subscriber into the access queue; and
in response to a determination that the publisher data queue is restricted, performing operations comprising:
performing additional validation on the subscriber based on the one or more access restrictions of the publisher data queue; and
granting the subscriber the access to the publisher data queue in response to a determination that the additional validation is successful.
9 . The method of claim 1 , further comprising:
determining that a message of the publisher data queue is expired;
moving the expired message from the publisher data queue into a publisher purge queue; and
removing the expired message from the publisher purge queue after a predetermined period.
10 . A system comprising:
one or more processors; and
a memory configured to store a plurality of components executable by the one or more processors, the plurality of components comprising:
a requesting module configured to receive a data queue request from a publisher;
a queue module configured to perform operations comprising:
generating a publisher data queue based on the data queue request,
updating or generating a publisher information queue comprising a specification of the publisher data queue, and
updating or generating an access queue comprising one or more access restrictions of the publisher data queue; and
an access module configured to control access to the publisher data queue based on the access queue and the publisher information queue.
11 . The system of claim 10 , wherein, in controlling the access to the publisher data queue based on the access queue and the publisher information queue, the access module is configured to perform operations comprising:
receiving, from a subscriber, a queue access request for the publisher data queue;
performing validation on the subscriber based on the access queue; and
granting the subscriber the access to the publisher data queue in response to a determination that the validation is successful.
12 . The system of claim 11 , wherein the queue access request comprises at least one of a URL of the publisher, a user ID of the subscriber, a last access key associated with the publisher data queue, a timestamp of the queue access request, or a notification method, and wherein the data queue request comprises at least one of an entity name of the publisher, a name of the publisher data queue, an access restriction of the publisher data queue, a format of payload of the publisher data queue, or an expiration time of a message of the publisher data queue.
13 . The system of claim 11 , wherein the queue module is further configured to update or generate a notification queue based on the queue access request, wherein the notification queue contains one or more notification methods for a message of the publisher data queue, and wherein the plurality of components further comprise a notification module configured to notify the subscriber based on the notification queue.
14 . The system of claim 11 , wherein the access module is further configured to reprocess the queue access request using a last key associated with the subscriber with respect to the publisher data queue in response to a determination that an issue of the access occurs.
15 . The system of claim 11 , wherein, in controlling the access to the publisher data queue based on the access queue and the publisher information queue, the access module is configured to perform operations comprising:
determining a type of the publisher data queue based on the access queue;
in response to a determination that the publisher data queue is a public data queue, inserting the subscriber into the access queue; and
in response to a determination that the publisher data queue is restricted, performing operations comprising:
performing additional validation on the subscriber based on the one or more access restrictions of the publisher data queue; and
granting the subscriber the access to the publisher data queue in response to a determination that the additional validation is successful.
16 . The system of claim 10 , wherein the plurality of components further comprise a reprocessing module configured to perform operations comprising:
determining that a message of the publisher data queue is expired;
moving the expired message from the publisher data queue into a publisher purge queue; and
removing the expired message from the publisher purge queue after a predetermined period.
17 . One or more computer-readable media storing computer-executable instructions that, when executed on one or more processors, cause the one or more processors to perform acts comprising:
receiving a data queue request from a publisher;
generating a publisher data queue based on the data queue request;
generating a publisher information queue comprising a specification of the publisher data queue;
generating an access queue comprising one or more access restrictions of the publisher data queue; and
controlling access to the publisher data queue based on the access queue and the publisher information queue.
18 . The one or more computer-readable media of claim 17 , wherein the acts further comprise:
obtaining a URL for the publisher data queue; and
transmitting the URL to the publisher based on a name of the publisher data queue and an entity name of the publisher.
19 . The one or more computer-readable media of claim 17 , wherein the controlling of the access to the publisher data queue based on the access queue and the publisher information queue comprises:
receiving, from a subscriber, a queue access request for accessing the publisher data queue;
performing validation on the subscriber based on the access queue; and
granting the subscriber the access to the publisher data queue in response to a determination that the validation is successful.
20 . The one or more computer-readable media of claim 19 , wherein the acts further comprise:
updating or generating a notification queue based on the queue access request, the notification queue containing one or more notification methods for a message of the publisher data queue; and
notifying the subscriber based on the notification queue.