State-of-the-World
📄️ What is the difference between a Topic in the SOW and the Transaction Log?
A Topic defined in the State of the World directs AMPS to maintain the current value for an individual message in the topic. The Topic configuration also specifies how the AMPS server distinguishes different messages (typically, by providing a Key).
📄️ How does a messaging product support queries?
AMPS has the capability to store real-time messages in a State of the World (SOW) database by topic -- similar to how a SQL database stores data in a table.
📄️ How do I subscribe to a view or an aggregate in my program?
There's nothing special that you need to do in a program to subscribe to a view or an aggregate. You can use the same code that you would use to subscribe to any other topic. For example, in Python:
📄️ How can I paginate a SOW Query?
AMPS includes the skipn option, which provides the ability to skip a set number of rows from a SOW query. Combined with the topn and OrderBy options, this makes it easy to paginate a SOW query.
📄️ What happens if data changes while a SOW query is running?
AMPS guarantees that SOW queries are atomic, so even if the data changes while the SOW query is running, you get the results as of the point at which AMPS started the SOW query.
📄️ Does AMPS return messages from the SOW in the order published?
AMPS doesn't guarantee any particular order for SOW messages. If you need to determine the order in which a client published messages, we recommend adding a field containing a timestamp to the message.
📄️ How many columns/fields can I have in a SOW topic? In a view?
AMPS doesn't have any practical limit on the number of fields you can have in a SOW topic or project into a view. Some of our customers regularly process multi-megabyte messages in production.
📄️ What is "Focus" in AMPS?
A message that matches a subscription's topic and content filter is said to be "In Focus" for that subscription. AMPS will deliver messages that are "In Focus" for any subscription. However, sophisticated messaging applications may need to know when a message not only matches a subscription, but when it's updated so that it no longer matches a subscription, or becomes "Out of Focus".
📄️ What are some ways to consume large SOW queries?
AMPS has sophisticated and configurable slow consumer mitigation functionality that protects AMPS and other consumers from performance degradation due to a single over-subscribed consumer. The defaults for the slow consumer configuration may not be enough to handle large SOW queries where the consumer will have large bursts of over-subscription followed by long quiet periods of processing.
📄️ Do I need to list every field in a SOW topic configuration?
Not unless you need the SOW topic to keep every message published to the topic.
📄️ How can I get the number of records in a SOW topic?
There are several ways to get the number of records in a SOW topic without pulling every record into the client. Here are the best ways in order of preference:
📄️ How can I delete messages from a SOW topic?
There are several ways to do this, depending on your needs.
📄️ Should I use the SOW delete action or message expiration to maintain my SOW?
The best way to maintain a SOW depends on the needs of your application and the data involved.
📄️ How do I configure SOW storage parameters?
For many applications, it is not necessary to change the default values for the SOW storage parameters.
📄️ How do I only get the first 100 records from a SOW Query?
AMPS provides a topn option on SOW queries that returns only a specific number of results. Because SOW queries don't return records in any specific order by default, topn is often most useful with the OrderBy option to return records in a specific order.
📄️ What is the difference between historical SOW and bookmark replay?
The purpose of a SOW historical query is to get a historical view of the "most current" state of a set messages at a point in time. By contrast, a bookmark replay is intended to replay a set of messages starting at a point in time. These serve different purposes, and produce different results.
📄️ Do I have to add configuration for every topic I want to publish to?
No, this isn't necessary to simply publish and subscribe.
📄️ How does AMPS construct the SowKey for a message?
AMPS constructs the SowKey for the message from the contents of the defined Key fields for the topic and the KeyDomain for the topic (which is the name of the SOW topic by default).
📄️ What happens if I change the key of a SOW topic?
AMPS allows you to change the definition of a SOW topic in the configuration file, and restart the server.