Using amps-grep to Search the Journal
Using amps-grep to Find Messages in the Transaction Log
The transaction log maintains a full record of the messages published to the topics recorded in the transaction log.
Finding an exact sequence of messages recorded by an instance can be useful in troubleshooting issues with applications or AMPS itself. The simplest way to find a sequence of messages in the AMPS transaction log is by using the amps-grep
utility.
When used to find records in a transaction log, amps-grep
also includes the header information for each journal file in the output, to help in cases where the intent of searching the journal is to be able to preserve a sequence of messages or analyze the journals further.
Finding Messages from a Specific Client
When troubleshooting a publisher, it's often useful to be able to see the set of messages published by a particular publisher.
To find messages published from a specific publisher, use the following general pattern:
The amps-grep
command calculates the set of possible client name hashes for the given client name and returns the transaction log entries for those messages. The Linux shell then writes those entries to the out.txt
file.
Finding Messages for a Specific Topic
When troubleshooting message flow on a given topic, it's often useful to be able to see the full set of messages published to that topic.
To find messages published to a specific topic, provide the topic name to the amps-grep
utility as follows:
The amps-grep
command searches the journal files for all occurrences of the topic_name provided and returns the transaction log entries for those messages.
Finding Messages with Specific Data
In some cases, it can also be useful to find records with specific data. For example, this might be helpful to see the set of publishes to a specific key within a SOW topic, regardless of the publisher.
To find messages with specific data, provide the data to the amps-grep
utility as follows:
The amps-grep
command searches the journal files for all occurrences of the data provided and returns the transaction log entries for those messages.
Last updated