ExchangeStoreInterceptor
Membrane by default remembers the last few request and response messages that it processed. The stored messages can be displayed and they are used to compute performance statistics.
To keep the memory footprint low, only the last megabyte of data is remembered by default.
In some deployments all messages flowing through the Service Proxy should be saved to disk.
To meet all these requirements, the storing of
exchanges was implemented for wide-ranging flexibility. The functionality is realized it the ExchangeStoreInterceptor that can be
configured with an implementation of the interface ExchangeStore.
Figure1:
ExchangeStore
An exchange store saves a request/response message pair. There are different implementations for the exchange store.
FileExchangeStore
The FileExchangeStore saves all captured messages to disk. Set the value of the property dir to the folder where you want to save messages.
<fileExchangeStore id="myExchangeStore" dir="/temp" saveBodyOnly="false" />
See fileExchangeStore's reference page for details.
MemoryExchangeStore
Exchanges are stored in memory. This exchange store, is for example used by Membrane Monitor, the GUI add-on to Membrane Service Proxy.
<memoryExchangeStore id="myExchangeStore" />
See memoryExchangeStore's reference page for details.
LimitedMemoryExchangeStore
Exchanges are stored in memory, but only up to a certain memory usage. This exchange store is used by Membrane Service Proxy's default configuration.
<limitedMemoryExchangeStore id="myExchangeStore" maxSize="10000000" />
See limitedMemoryExchangeStore's reference page for details.