Skip to main content

Examples

The AMPS Python Client includes a set of example programs that provide simple demonstrations of client functionality.

The sample archive is available that includes a set of samples and a configuration file for AMPS: python-examples.zip

tip

Examples may need to be updated with the IP address or DNS name of the host running AMPS unless you are running both the samples and the AMPS server on the same system.

The samples archive includes samples such as:

Sample NameDemonstrates
AMPSConsoleSubscriber.pySimple subscriber to an adhoc topic.
AMPSConsolePublisher.pySimple publisher to an adhoc topic.
AMPSFIXBuilderPublisher.pySubscriber that uses the provided convenience class to create FIX messages
AMPSFIXShredderSubscriber.pySubscriber that uses the provided convenience class to parse FIX messages
AMPSNVFIXBuilderPublisher.pySubscriber that uses the provided convenience class to create NVFIX messages
AMPSNVFIXShredderSubscriber.pySubscriber that uses the provided convenience class to parse NVFIX messages
AMPSPublishForReplay.pySimple publisher targeting a topic in the transaction log
AMPSQueueConsumer.pySubscriber that consumes from a queue
AMPSQueuePublisher.pySimple publisher targeting a queue topic (which must also be in the transaction log)
AMPSSOWConsolePublisher.pySimple publisher targeting a topic in the State of the World
AMPSSOWQuerypyPoint in time query of a topic in the State of the World
AMPSSOWAndSubscribeConsoleSubscriber.pyPoint in time query of and ongoing subscription to a topic in the State of the World
AMPSSOWandSubscribeWithOOF.pyPoint in time query of and ongoing subscription to a topic in the State of the World. This subscription also requests out of focus notifications if a message is deleted or no longer matches the subscription
AMPSUpdateForOOF.pyPublisher that updates messages to generate out of focus messages in the AMPSSOWandSubscribeWithOOF.py example
AMPSSubscribeForReplay.pySubscriber requesting a replay from the transaction log (bookmark subscribe)
CompositeMessagePublisher.pyPublisher that uses the provided convenience class to create a composite messages
CompositeMessageSubscriber.pyPublisher that uses the provided convenience class to consume a composite message