INT-3286: Add @EnableMessageHistory
JIRA: https://jira.springsource.org/browse/INT-3286 Introduce `@EnableMessageHistory` and `MessageHistoryRegistrar`. Refactoring for `MessageHistoryParser` to use `MessageHistoryRegistrar` to follow with DRY Add test for `@EnableMessageHistory` INT-3286: Polishing INT-3286: Enable several MHs with the same value Previously the Framework allowed only one `<message-history>` independent of their `tracked-components`. With introduction of `@EnableMessageHistory` and `MessageHistoryRegistrar` the `MessageHistoryConfigurer` is improved to allow several `<message-history>` or `@EnableMessageHistory` with the same set of `componentNamePatterns`. INT-3286 Polishing + JMX + Docs * Allows setComponentNamePatterns and/or setComponentNamePatternsSet to be used as long as the settings are consistent. * Handle the case where the `MHC` was configured as a bean (no managed set exists) * Add support for changing the component name patterns over JMX + test case * Docs INT-3286 More Polishing * Change bean name to `messageHistoryConfigurer` * Move constant to `ICU` * Export the MBean by the `IMBE`
This commit is contained in:
committed by
Gary Russell
parent
d8e4818c5e
commit
2fd27e3a6c
@@ -59,6 +59,19 @@ assertEquals("sampleChain", chainHistory.get("name"));]]></programlisting>
|
||||
In the above example, Message History will only be maintained for all of the components that end with 'Gateway', start with 'sample',
|
||||
or match the name 'foo' exactly.
|
||||
</para>
|
||||
<para>
|
||||
Starting with <emphasis>version 4.0</emphasis>, you can also use the <code>@EnableMessageHistory</code> annotation
|
||||
in a <code>@Configuration</code> class. In addition, the <classname>MessageHistoryConfigurer</classname> bean
|
||||
is now exposed as a JMX MBean by the <classname>IntegrationMBeanExporter</classname>
|
||||
(see <xref linkend="jmx-mbean-exporter"/>), allowing the patterns to be changed at runtime.
|
||||
Note, however, that the bean must be stopped (turning off message history) in order to change the patterns.
|
||||
This feature might be useful to temporarily turn on history to analyze a system.
|
||||
The MBean's object name is <code>"<domain>:name=messageHistoryConfigurer,type=MessageHistoryConfigurer"</code>.
|
||||
</para>
|
||||
<important>
|
||||
If multiple beans (declared by <code>@EnableMessageHistory</code> and/or <code><message-history/></code>) they
|
||||
all must have identical component name patterns (when trimmed and sorted).
|
||||
</important>
|
||||
<note>
|
||||
Remember that by definition the Message History header is immutable (you can't re-write history, although some try). Therefore, when writing
|
||||
Message History values, the components are either creating brand new Messages (when the component is an origin), or they are copying the
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
>Migration Guide</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<section id="4.0-enable-configuration">
|
||||
<title>@EnableConfiguration</title>
|
||||
<para>
|
||||
The <code>@EnableIntegration</code> annotation has been added, to permit declaration of
|
||||
@@ -43,6 +43,14 @@
|
||||
<xref linkend="enable-integration"/> for more information.
|
||||
</para>
|
||||
</section>
|
||||
<section id="4.0-message-history">
|
||||
<title>@EnableMessageHistory</title>
|
||||
<para>
|
||||
Message history can now be enabled with the <code>@EnableMessageHistory</code> annotation in a
|
||||
<code>@Configuration</code> class; in addition the message history settings can be modified
|
||||
by a JMX MBean. For more information, see <xref linkend="message-history"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="4.0-xpath-header-enricher-header-type">
|
||||
<title>Header Type for XPath Header Enricher</title>
|
||||
<para>
|
||||
|
||||
Reference in New Issue
Block a user