Go to new doc!

+49 228 5552576-0


info@predic8.com

ExchangeStoreInterceptor

Membrane Monitor remembers every request and response message that it processes. The stored messages can be displayed and they are needed to compute performance statistics.
But on the other hand Membrane Router should not remember messages by default to keep the memory footprint low.

In some deployments all messages flowing through the router should be saved to disk.
To meet all these requirements the storing of exchanges must be flexible. Therefore the functionality was moved to a 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.

		
		<bean class="com.predic8.membrane.core.exchangestore.FileExchangeStore">
		  <property name="dir" value="/temp" />
		  <property name="saveBodyOnly" value="false" />
		</bean>
		
	
Listing 1: FileExchangeStore Bean Configuration

See configuration/monitor-beans.xml for details.

MemoryExchangeStore

Exchanges are stored in memory. The monitor GUI needs this store to populate the exchanges table.

		<bean class="com.predic8.membrane.core.exchangestore.MemoryExchangeStore" />
	
Listing 2: MemoryExchangeStore Bean Configuration

See configuration/monitor-beans.xml for details.

ForgetfulExchangeStore

Exchanges are not stored. This is a default store of the router.

		<bean class="com.predic8.membrane.core.exchangestore.ForgetfulExchangeStore" />
	
Listing 3: ForgetfulExchangeStore Bean Configuration

See configuration/monitor-beans.xml for details.