Skip to content

Reconsider a default order value for default LoggingHandler subscribed into a default errorChannel by the framework #3555

@nikhilvasaikar

Description

@nikhilvasaikar

In what version(s) of Spring Integration are you seeing this issue?

5.4.3

Describe the bug

There is no consistency between DSL and XML config for the order of subscribers on the global errorChannel. The order attribute also does not cause any effect in the XML configuration.

To Reproduce

  1. Add a exception throwing service-activator to the global errorChannel
  2. Simulate a message dispatch to the global errorChannel

When the above is implemented using DSL, the behavior is as expected below. However, when implemented in XML, the exception throwing service-activator in invoked before the error logging handler, hence causing the error logging handler to be never invoked as both subscribers are invoked on the caller's thread. Setting order="100" on the service-activator XML declaration also has no effect.

Expected behavior

  1. The default error logging handler attached to the global errorChannel should be invoked first and must log the error
  2. The exception throwing service-activator must be invoked after, not before the error logging handler

Sample

A brief description and scenario under which this issue was encountered is available at this stackoverflow post.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions