Selective message republishing to subscriber subsets in a publish-subscribe model
First Claim
1. A computer system for selectively resending a message in a publish-subscribe message distribution model, comprising:
- one or more processors, one or more non-transitory computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising;
receiving the message;
determining that at least one subscriber within a plurality of subscribers is a non-durable subscriber;
generating a dynamic unique ID for the non-durable subscriber, wherein the generated dynamic unique ID is valid for a lifecycle associated with the non-durable subscriber;
generating a message ID for the received message, wherein the generated message ID is assigned to the received message;
sending the received message to the plurality of subscribers;
receiving a rolled back message from a subscriber within the plurality of subscribers;
incrementing a redelivery counter associated with the received rolled back message;
resending the rolled back message to the subscriber based on determining the redelivery counter does not exceed a count limit;
enqueuing the received rolled back message in a data structure based on determining the redelivery counter exceeds the count limit and based on determining that no message enqueued in the data structure has an ID matching the message ID of the received rolled back message;
creating a republish list associated with the enqueued rolled back message in response to enqueuing the enqueued rolled back message;
adding a subscriber ID associated with the subscriber to the republish list based on determining the redelivery counter exceeds the count limit;
determining that the enqueued rolled back message should be resent;
retrieving the republish list associated with the rolled back message based on determining that the enqueued rolled back message should be resent;
determining when a subscriber ID matches a subscriber ID in the retrieved republish list;
creating a message copy based on the rolled back message for a subscriber associated with the subscriber ID in the retrieved republish list;
sending the created message copy to the subscriber associated with the subscriber ID;
removing the subscriber ID from the retrieved republish list; and
dequeuing the rolled back message from the data structure based on determining that there are no remaining subscriber IDs in the retrieved republish list.
1 Assignment
0 Petitions
Accused Products
Abstract
According to one exemplary embodiment, a method for selectively resending a first message in a publish-subscribe message distribution model is provided. The method may include receiving the first message having a first message ID associated with the first message. The method may include sending the first message to a plurality of subscribers. The method may include receiving a rolled back first message. The method may include determining if the first message ID matches a second message ID associated with a second message. The method may include creating a first subscriber list associated with the first message. The method may include storing the first message in a data structure. The method may include appending a second subscriber list associated with the second message with a subscriber. The method may include sending the second message to the first subscriber or the first message to the first subscriber.
-
Citations
10 Claims
-
1. A computer system for selectively resending a message in a publish-subscribe message distribution model, comprising:
-
one or more processors, one or more non-transitory computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising; receiving the message; determining that at least one subscriber within a plurality of subscribers is a non-durable subscriber; generating a dynamic unique ID for the non-durable subscriber, wherein the generated dynamic unique ID is valid for a lifecycle associated with the non-durable subscriber; generating a message ID for the received message, wherein the generated message ID is assigned to the received message; sending the received message to the plurality of subscribers; receiving a rolled back message from a subscriber within the plurality of subscribers; incrementing a redelivery counter associated with the received rolled back message; resending the rolled back message to the subscriber based on determining the redelivery counter does not exceed a count limit; enqueuing the received rolled back message in a data structure based on determining the redelivery counter exceeds the count limit and based on determining that no message enqueued in the data structure has an ID matching the message ID of the received rolled back message; creating a republish list associated with the enqueued rolled back message in response to enqueuing the enqueued rolled back message; adding a subscriber ID associated with the subscriber to the republish list based on determining the redelivery counter exceeds the count limit; determining that the enqueued rolled back message should be resent; retrieving the republish list associated with the rolled back message based on determining that the enqueued rolled back message should be resent; determining when a subscriber ID matches a subscriber ID in the retrieved republish list; creating a message copy based on the rolled back message for a subscriber associated with the subscriber ID in the retrieved republish list; sending the created message copy to the subscriber associated with the subscriber ID; removing the subscriber ID from the retrieved republish list; and dequeuing the rolled back message from the data structure based on determining that there are no remaining subscriber IDs in the retrieved republish list. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer program product for selectively resending a message in a publish-subscribe message distribution model, comprising:
-
one or more non-transitory computer-readable storage medium and program instructions stored on at least one of the one or more tangible storage medium, the program instructions executable by a processor, the program instructions comprising; program instructions to receive the message; program instructions to determine that at least one subscriber within a plurality of subscribers is a non-durable subscriber; program instructions to generate a dynamic unique ID for the non-durable subscriber, wherein the generated dynamic unique ID is valid for a lifecycle associated with the non-durable subscriber; program instructions to generate a message ID for the received message, wherein the generated message ID is assigned to the received message; program instructions to send the received message to the plurality of subscribers; program instructions to receive a rolled back message from a subscriber within the plurality of subscribers; program instructions to increment a redelivery counter associated with the received rolled back message; program instructions to resend the rolled back message to the subscriber based on determining the redelivery counter does not exceed a count limit; program instructions to enqueue the received rolled back message in a data structure based on determining the redelivery counter exceeds the count limit and based on determining that no message enqueued in the data structure has an ID matching the message ID of the received rolled back message; program instructions to create a republish list associated with the enqueued rolled back message in response to enqueuing the enqueued rolled back message; program instructions to add a subscriber ID associated with the subscriber to the republish list based on determining the redelivery counter exceeds the count limit; program instructions to determine that the enqueued rolled back message should be resent; program instructions to retrieve the republish list associated with the rolled back message based on determining that the enqueued rolled back message should be resent; program instructions to determine when a subscriber ID matches a subscriber ID in the retrieved republish list; program instructions to create a message copy based on the rolled back message for a subscriber associated with the subscriber ID in the retrieved republish list; program instructions to send the created message copy to the subscriber associated with the subscriber ID; program instructions to remove the subscriber ID from the retrieved republish list; and program instructions to dequeue the rolled back message from the data structure based on determining that there are no remaining subscriber IDs in the retrieved republish list. - View Dependent Claims (7, 8, 9, 10)
-
Specification