Table of Contents |
---|
Overview
FIXEdge/J provides the an ability to store information in the memory for purposes of message enrichment during the routing process. This functionality is based on a key-value storage.
While processing a message from one endpoint to another, FIXEdge/J may store any information in the storage and then retrieve it while routing in the opposite direction.
Advantages: storing data in-memory data storing confers performance advantages.
Disadvantages: FIXEdge/J will lose all stored information on restart.
Configuration
There are several methods in the Groovy rules that can be used for this functionality:
Method name | Methods signature | Description | Example | ||
---|---|---|---|---|---|
saveContext | Object saveContext(Object key, Object value) | Associates the specified value with the specified key in this storage. If the storage previously contained a mapping for the key, the old former value is replaced by the specified value. Params:
Returns:
|
or
| ||
removeContext | Object removeContext(Object key) | Removes the mapping for the key from the given storage if it is present. The storage will not contain a mapping for the specified key once the call returns. Params:
Returns:
|
| ||
getContext | Object getContext(Object key) | Returns the value to which the specified key is mapped, or NULL if this map contains no mapping for the key. Params:
Returns:
|
| ||
cleanContext | void cleanContext(Predicate<Map.Entry<Object, Object>> consumer) | Removes entries from the context according to the provided predicate. |
|
...
ClOrdID replacement
Business case: broker Broker should replace the identificators provided by the Clients to the IDs corresponding to Exchange's requirements and format.
...