Adapter Endpoints can be associated with a single Adapter Policy. Adapter Policies allow you to specify rules that govern how Neuron works with subscription side Adapter Endpoints, specifically in the case of failure. You can control the following with an adapter policy:
- The number of times to retry sending a message to an adapter before declaring a message undeliverable
- How long to wait between retry attempts
- The default expiration time of a transactional message
- What actions to take if a message is undeliverable
- Whether or not to audit the message to a database
- Whether or not to save the message as a file
- Whether or not to republish the message on an alternate topic
- Whether or not to discard the message
To create an Adapter Policy in the Neuron ESB Explorer, select Connections -> Policies -> Adapter Policies from the navigation bar located on the left hand side of the Neuron ESB Explorer. This will open the Adapter Policy Management Window. When an Adapter Policy is selected, the Details Pane will be displayed on the lower bottom of the Management Window. Below this will be the navigation bar. Above the Management Window will be the Search bar. The Details Pane is where users enter information for a new Adapter Policy, or modify information for an existing Adapter Policy.
Once an Adapter Policy is persisted to the Neuron ESB Configuration (by clicking the Apply button), it will not be enabled for runtime execution or activation until it is saved (by clicking the Save toolbar button).
The Management Window displays a list of all saved Adapter Policies within the currently opened Neuron ESB configuration. This list can be sorted by clicking on any column within the grid.
The Details Pane lies below the Management Window and is only displayed when an Adapter Policies within the Management Window is selected. The Details Pane contains all the configuration settings for an Adapter Policies.
The Navigation Bar lies directly below the Management Window and Details Pane. This allows the user to filter all the Adapter Policiesc urrently being viewed in the Management Window by Alpha. The Navigation Bar options are “All”, which will display all topics (default), as well all the letters in the English alphabet (A-Z).
The Search Bar allows users to search for a specific Adapter Policies name. By the default, the search field accepts one parameter and uses that in a wildcard search. For example, if the following were entered:
The following Adapter names would be returned
Searches are not case sensitive and search terms must be entered without quotation marks.
Augmenting the Search Bar is a Category filter. All categories created will be auto populated in the drop down selection. By default the selection is “All” which displays all Adapters with all categories.
Adapter Policies can be added by clicking the “New” button located at the top of the Management Window. This will display the Details Pane that can be configured for a new Adapter Policy.
Adapter Policies can be deleted by clicking the “Delete” button located at the top of the Management Window. This will delete the currently selected Adapter Policy.
The configuration of one Adapter Policy can be completely copied to new Adapter Policy by clicking the “Copy” button located at the top of the Management Window. The essentially creates a new Adapter Policy.
Configuration of existing and new Adapter Policies is done through the Details Pane. The Details Pane consists of two tabs, representing two sections of the configuration:
- General – general information such as the name of the policy name, the category (metadata) associated with the policy and description.
- Failure Actions – This has two sections, Retry Configuration and Failure Actions. Rules for retrying and failure actions are defined here.
- Availability – This allows users to define the days and times that the Adapter Endpoint should be available
- Endpoints – This allows users to select the Adapter Endpoints that the Policy should apply to.
Users must select the Apply button, followed by clicking the Save button on the toolbar for any changes made to Adapter Policy configuration to take effect. All changes are made dynamically if the Neuron ESB Explorer is connected to the configuration in “OnLine” mode. If the Neuron ESB Explorer is connected to a configuration file in “OffLine” mode, but the Neuron ESB Service is configured to use that same configuration file, the Neuron ESB Service will detect the file change, and load the changes to the Adapter Policy dynamically.
The General tab of the Details Pane is the first section to configure when creating or modifying an Adapter Policy.
|Policy Name||Yes||This is the friendly name of the Adapter Policy|
|Description||No||Text description of the Adapter Policy. Will be displayed in the Management Window.|
|Category||No||Metadata associated with the Adapter Policy. Any existing categories will be displayed in the drop down box. If a new category is desired, it can be manually entered into the text box. Once the Adapter Policy has been saved, the new category will be available to be used anywhere within the Neuron ESB Explorer|
The Failure Actions tab contains two sections, Retry Configuration and Failure Actions. Retry Configuration contains the rules that determine the number of times and the delay interval that the Neuron ESB runtime will attempt to deliver a message to an Adapter Endpoint (subscription side Adapter Endpoint). The Failure Actions determine what option the Neuron ESB runtime will execute once the number of retries have been exhausted.
Property Table – Retry Configuration
|Number of Retries||No||Default is 1. Only required if using a Topic that is non-Transactional. If non-Transactional, this specifies the number of times the Neuron ESB runtime will try to deliver the message to the Adapter Endpoint. Each retry is separated by the delay interval. If a Transactional Topic is used, retries will be continuous, internally represented by a transactional rollback called on the Topic.|
|Delay Interval||Yes||Default is 1. Expressed in Seconds. Determines the time to wait between Number of Retries.|
|Default Expiration||No||Default is 5. Expressed in Minutes. Only used with transactional Topic. The Default Expiration is used differently depending on the following scenarios:· Adapters Publishing MessagesThe Default Expiration value in the UI will always be used, UNLESS the Expires ESB Message Header value is modified in a process BEFORE the message is published to the bus. If the latter, than the Expires value will be used to set the value of the Default Expiration.· Test Client or Party Object Publishing MessagesThe Default Expiration value is always set using the value of the Expires ESB Message Header of the published message. If the Expires value is set to the default max setting (12/31/9999 3:59:59:9999 PM), the Adapter Endpoint will retry delivery of the messages infinitely (Infinite Loop)..|
Property Table – Failure Actions (one must be selected)
|Republish||No||This will publish the failed message to a configurable Topic. However, the Topic selected must be a valid subscription of the Party that the Adapter Endpoint is associated with.|
|Log to Disk||No||Will write the failed ESB message to a log file. User can select a folder path. By default, the \messages folder under the default Neuron ESB installation directory is used to store all files.Each ESB Message is written to its own file in the format of:<MessageID>.esbmsgEach ESB Message contains the body, headers and any custom properties.|
|Log to Database||No||Will write the failed ESB Message to the Audit database. To enable this option, the Audit database must be setup for the current deployment group AND auditing MUST be enabled on the Topic that the message is published to.Failed Messages may be viewed by selecting Activity ->Administration->Failed Messages from the navigation bar located on the left hand side of the Neuron ESB Explorer|
|Discard Message||No||Will silently discard the message.|
The Availability tab controls the day and times that an Adapter Endpoint will be able to either submit messages to the bus, or retrieve messages from the bus. By default, Adapter Endpoints are configured to always be available.
If the Limited Availability radio button option is selected under the Operational Availability section, then a data grid will be presented allowing the configuration of availability by day and time. Multiple rows can be created within the data grid, each column representing a checkbox for a specific day in the week, with the last two columns specifying the start and end times of availability for the checked days.
For example, in Figure 16 below, the Limited Availability option is selected and the Available times for the Adapter Endpoints are configured for Mon – Fri, 8am to 5pm and Sat and Sun from 1pm to 4pm.
There are important considerations to make before using this feature.
- If an Adapter Endpoint is unavailable due to the configured Availability window (the days and times configured in the Availability data grid), there is no indication in the Adapter Endpoint management window or in the Endpoint Health monitoring window that the Adapter Endpoint is unavailable.
- If Messages are submitted to Adapter endpoints either by the adapters themselves or by the Neuron ESB service OUTSIDE the configured time of Availability the messages WILL BE PERMANANTLY LOST and there will be no notification that the message loss occurred.
For example, the following two scenarios describe how the Availability window works with Publish and Subscribe modes of an Adapter Endpoint when a Policy is created to ONLY allow availability on Mondays, between 8am and 5pm and Tuesdays, between Noon and 4pm.
- Publish mode of an Adapter Endpoint:
- An Adapter Endpoint using the File Adapter monitors a folder (Publish mode) and publishes files as messages to Neuron ESB.
- The day is Wednesday, 1pm (OUTSIDE of the configured time of availability).
- All files from the monitored folder will be removed and consumed by the File Adapter and silently discarded.
- Once discarded, the messages will not be submitted to bus, even when the time changes to be INSIDE the configured time of availability.
- Subscribe mode of an Adapter Endpoint:
- An Adapter Endpoint using the File Adapter is configured to write all files it receives from the bus to a specific directory (Subscribe mode).
- The day is Wednesday, 1pm (OUTSIDE of the configured time of availability).
- All messages are received by the File Adapter Endpoint, but are silently discarded and never written to the destination folder.
- Once discarded, the messages are permanently lost and will not be resubmitted to the Adapter Endpoint, even when the time changes to be INSIDE the configured time of availability.
The Endpoints tab displays all Adapter Endpoints configured within Neuron ESB within a data grid. Besides each Adapter Endpoint is a check box, indicating whether or not the current Adapter Policy is assigned to the Adapter Endpoint. Assignment or un-assignment of the Adapter Policy to an Adapter Endpoint can be easily made by checking or un-checking the checkbox besides its name.