public interface ChannelInitialKeyResolutionTableProvider
| Modifier and Type | Method and Description |
|---|---|
Properties |
getInitialChannelKeyResolutionTable(ToaService service,
ToaServiceChannel channel)
Called by a Topic Oriented Application at the time it is configured which allows all or a portion
of a channel's dynamic key parts to be determined statically at configuration time by returning a
initial Key Resolution Table (KRT).
|
Properties getInitialChannelKeyResolutionTable(ToaService service, ToaServiceChannel channel)
Example:
Given:With the above KRT, the channel would be initialized with a key of
- A channel, channel1 with a configured key of: ORDERS/${Region}/${Product}
- An initial KRT returned by this method of: {"Region": "US", "HostName": MyPC}
ORDERS/US/${Product}. The dynamic 'Region' portion of the key has become static while the 'Product' portion remains dynamic and eligible for substitution with a runtime KRT or from values reflected from a message reflector.
NOTE:
The returned key resolution table is not used for individual send calls, if
the channel key still contains dynamic portions then dynamic key resolution
can be done on a per send basis using either the message's message reflector
or a key resolution table provide as a argument to the send call.
If more than one service share the same channel on the same bus, they will share the same channel key; at this time it is not possible to perform individual channel key resolution on a per service basis. In this sense the initial channel key resolution is global to a channel name. The serviceName is provided here as a hint to assist the application in locating a key resolution table for a channel.
Initial Key Resolution adheres to the key resolution properties:
MessageChannel.PROP_TREAT_EMPTY_KEY_FIELD_AS_NULL if set to true, then
initial channel key resolution will ignore values that are 0 length strings.
MessageChannel.PROP_ALLOW_EMPTY_KEY_FIELD is set then
initial channel key resolution will fail with a ToaException if the key resolution
table contains any value that are 0 length Strings.
service - The service name.channel - The channel for which to perform key resolutionTopicOrientedApplication messaging configurationCopyright © 2016 N5 Technologies, Inc. All Rights Reserved.