@Import(value=GeodeClientRegionConfiguration.class)
@Configuration
@PropertySource(value="classpath:geode-client.properties")
@EnableConfigurationProperties(value=GeodeSupplierProperties.class)
public class GeodeSupplierConfiguration
extends Object
The Geode Supplier which publishes a message for each event matching the criteria for a
configured Region. If a query is provided, this will use a
ContinuousQueryMessageProducer
to publish
CqEvent
s that match the query selection criteria.
If no query is provided, this will use a CacheListeningMessageProducer
to
publsh EntryEvent
s.
A SpEl Expression, given by the property 'eventExpression' is evaluated to extract
desired information from the payload. The default expression is 'newValue' which
returns the current object value. This may not be ideal for every use case especially
if it does not provide the key value. The key is referenced by the field 'key'. If the
cached key and value types are primitives, an simple expression like "key + ':' +
newValue" will work. Additional available depend on the specific event type.
More complex transformations, such as Json, will require customization. To access the
original object, set 'entryExpression' to '#root' or "#this'.
This converts payloads of type PdxInstance
, which Geode uses to store JSON
content (the type of 'newValue' for instance), to a JSON String.
- Author:
- David Turanski