INT-3099 Add IMAP Idle Application Events
Allow an application to be informed of problems on the IMAP idle thread by emitting an event containing the exception. Introduce IntegrationApplicationEvent hierarchy for all events emitted by SI components. INT-3099 Polishing (PR Comments) Separate TCP events into discrete subclasses.
This commit is contained in:
@@ -457,15 +457,17 @@
|
||||
attribute, which is a list of class names for events that should be sent. This can be used
|
||||
if an application subclasses <classname>TcpConnectionEvent</classname> for some reason, and wishes
|
||||
to only receive those events. Omitting this attribute will mean that all
|
||||
<classname>TcpConnectionEvent</classname>s will be sent.
|
||||
<classname>TcpConnectionEvent</classname>s will be sent. You can also use this to limit which
|
||||
<classname>TcpConnectionEvent</classname>s you are interested in (
|
||||
<classname>TcpConnectionOpenEvent</classname>, <classname>TcpConnectionCloseEvent</classname>,
|
||||
or <classname>TcpConnectionExceptionEvent</classname>).
|
||||
</para>
|
||||
<para>
|
||||
<classname>TcpConnectionEvents</classname> contain:
|
||||
<itemizedlist>
|
||||
<listitem>Event type (OPEN, CLOSE, EXCEPTION)</listitem>.
|
||||
<listitem>Connection Id (which can be used in a message header to send data to the connection)</listitem>
|
||||
<listitem>Connection Factory Name (the bean name of the connection factory the connection belongs to)</listitem>
|
||||
<listitem>The <classname>Throwable</classname> (for EXCEPTION event types only)</listitem>
|
||||
<listitem>The <classname>Throwable</classname> (for <classname>TcpConnectionExceptionEvent</classname> events only)</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -230,12 +230,19 @@ In the above example instead of relying on the default <classname>SearchTermStra
|
||||
overwrite="false"/>]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Finally, the <imap-idle-channel-adapter/> also accepts the 'error-channel' attribute.
|
||||
The <imap-idle-channel-adapter/> also accepts the 'error-channel' attribute.
|
||||
If a downstream exception is thrown and an 'error-channel' is specified,
|
||||
a MessagingException message containing the failed message and original exception, will be sent to this channel.
|
||||
Otherwise, if the downstream channels are synchronous, any such exception will simply be logged as a
|
||||
warning by the channel adapter.
|
||||
</para>
|
||||
<note>
|
||||
Beginning with the 3.0 release, the IMAP idle adapter emits application events (specifically <classname>
|
||||
ImapIdleExceptionEvent</classname>s) when exceptions occur. This allows applications to detect and act on those
|
||||
exceptions. The events can be obtained using an <code><int-event:inbound-channel-adapter></code>
|
||||
or any <interfacename>ApplicationListener</interfacename> configured to receive an
|
||||
<classname>ImapIdleExceptionEvent</classname> or one of its super classes.
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section id="mail-filtering">
|
||||
|
||||
@@ -224,5 +224,15 @@
|
||||
For more information see <xref linkend="stored-procedures"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="3.0-event-for-imap-idle">
|
||||
<title>IMAP Idle Connection Exceptions</title>
|
||||
<para>
|
||||
Previously, if an IMAP idle connection failed, it was logged but there was no mechanism to
|
||||
inform an application. Such exceptions now generate <classname>ApplicationEvent</classname>s.
|
||||
Applications can obtain these events using an <code><int-event:inbound-channel-adapter></code>
|
||||
or any <interfacename>ApplicationListener</interfacename> configured to receive an
|
||||
<classname>ImapIdleExceptionEvent</classname> or one of its super classes.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
Reference in New Issue
Block a user