Go to new doc!

+49 228 5552576-0


info@predic8.com

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.

Plugability of Exchange Stores

Figure1: Plugability of Exchange Stores

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" />
Listing 1: FileExchangeStore Bean Configuration

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" />
Listing 2: MemoryExchangeStore Bean Configuration

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" />
Listing 3: LimitedMemoryExchangeStore Bean Configuration

See limitedMemoryExchangeStore's reference page for details.