Publisher flow control and bounded guaranteed delivery for message queues
First Claim
Patent Images
1. A method for managing messages in computer systems, the method comprising:
- if one or more conditions are satisfied, then spilling over first one or more messages from a queue in volatile memory to a permanent store, wherein the first one or more messages were enqueued in the queue by a publisher;
in response to spilling over the first one or more messages, updating a parameter associated with the publisher, wherein the parameter indicates a particular message of second one or more messages that were enqueued by the publisher in the queue after the first one or more messages;
wherein the first one or more messages and the second one or more messages have not been consumed by all consumers of one or more consumers that are associated with the publisher; and
in response to the occurrence of an event that requires a replay operation, performing the steps of;
inspecting the parameter to identify the first one or more messages in the permanent store;
retrieving the first one or more messages from the permanent store and enqueueing the first one or more messages in the queue without causing the publisher to re-create and to re-enqueue the first one or more messages in the queue even though the first one or more messages have not been consumed by all consumers of the one or more consumers that are associated with the publisher; and
causing the publisher to re-enqueue the second one or more messages in the queue as part of the replay operation;
wherein the method is performed by the one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for managing messages in computer systems are provided. In one embodiment, in response to a publisher attempting to enqueue a message in a queue, a determination is made whether a condition is satisfied. The condition is based on the current usage of the queue by the publisher. Based on whether the condition is satisfied, a decision is made whether to enqueue the message in the queue. The decision whether to enqueue the message may comprise restricting the publisher from enqueueing any more messages in the queue until the same or a different condition is satisfied.
108 Citations
14 Claims
-
1. A method for managing messages in computer systems, the method comprising:
-
if one or more conditions are satisfied, then spilling over first one or more messages from a queue in volatile memory to a permanent store, wherein the first one or more messages were enqueued in the queue by a publisher; in response to spilling over the first one or more messages, updating a parameter associated with the publisher, wherein the parameter indicates a particular message of second one or more messages that were enqueued by the publisher in the queue after the first one or more messages; wherein the first one or more messages and the second one or more messages have not been consumed by all consumers of one or more consumers that are associated with the publisher; and in response to the occurrence of an event that requires a replay operation, performing the steps of; inspecting the parameter to identify the first one or more messages in the permanent store; retrieving the first one or more messages from the permanent store and enqueueing the first one or more messages in the queue without causing the publisher to re-create and to re-enqueue the first one or more messages in the queue even though the first one or more messages have not been consumed by all consumers of the one or more consumers that are associated with the publisher; and causing the publisher to re-enqueue the second one or more messages in the queue as part of the replay operation; wherein the method is performed by the one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory machine-readable medium storing one or more sequences of instructions which, when executed by one or more processors, cause the one or more processors to perform steps comprising:
-
if one or more conditions are satisfied, then spilling over first one or more messages from a queue in volatile memory to a permanent store, wherein the first one or more messages were enqueued in the queue by a publisher; in response to spilling over the first one or more messages, updating a parameter associated with the publisher, wherein the parameter indicates a particular message of second one or more messages that were enqueued by the publisher in the queue after the first one or more messages; wherein the first one or more messages and the second one or more messages have not been consumed by all consumers of one or more consumers that are associated with the publisher; and in response to the occurrence of an event that requires a replay operation, performing the steps of; inspecting the parameter to identify the first one or more messages in the permanent store; retrieving the first one or more messages from the permanent store and enqueueing the first one or more messages in the queue without causing the publisher to re-create and to re-enqueue the first one or more messages in the queue even though the first one or more messages have not been consumed by all consumers of the one or more consumers that are associated with the publisher; and causing the publisher to re-enqueue the second one or more messages in the queue as part of the replay operation. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
Specification