Class DefaultSenderHeadersInterceptor


  • public class DefaultSenderHeadersInterceptor
    extends java.lang.Object
    A message interceptor that is able to add some commonly required header attributes in Synapse services.

    The DefaultSenderHeadersInterceptor is active by default for all sender endpoints. It can be disabled by * setting 'synapse.sender.default-headers.enabled=false'.

    The property spring.application.name is used to determine the value of the DefaultHeaderAttr.MSG_SENDER header attribute. This attribute can be used to identify the origin of a message.

    • Constructor Detail

      • DefaultSenderHeadersInterceptor

        public DefaultSenderHeadersInterceptor​(SynapseProperties synapseProperties)
        Creates a new DefaultSenderHeadersInterceptor with default configuration.

        By default, all capabilites are enabled.

        Parameters:
        synapseProperties - the properties used to configure the interceptor
      • DefaultSenderHeadersInterceptor

        public DefaultSenderHeadersInterceptor​(SynapseProperties synapseProperties,
                                               java.util.Set<DefaultSenderHeadersInterceptor.Capability> capabilities,
                                               java.time.Clock clock)
        Creates an instance of DefaultSenderHeadersInterceptor with enhanced configuration options.
        Parameters:
        synapseProperties - the properties used to configure the interceptor
        capabilities - the enabled capabilities
        clock - the clock used to generate timestamp attributes