Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3627 Build In Channel/Handler Metrics Instead of Proxy for JMX
  3. INT-3605

Maintain channel statistics within the channel itself rather than the JMX bean

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2 M1
    • Component/s: None
    • Labels:
      None

      Description

      It's somewhat cumbersome to know when a certain number of messages flow down a channel (for example to print out some info to a log file after a certain # of msgs have been received).

      Currently you could do something like this:

      <si:publish-subscribe-channel id="seconds">
          <si:interceptors>
              <si:wire-tap channel="thresholdLogger" selector="selector" />
          </si:interceptors>
      </si:publish-subscribe-channel>
      
      <bean id="selector" class="org.springframework.integration.filter.ExpressionEvaluatingSelector">
          <constructor-arg 
              value="@mbeanServer.getAttribute('org.springframework.integration:type=MessageChannel,name=seconds', 'SendCount') > 5" />
      </bean>
      
      <si:logging-channel-adapter id="thresholdLogger" />
      

      It would be nice if the stats were maintained in the channel itself instead of the MBean so we could just use something like this: @channelName.sendCount > 5.

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            tonyjoe Anthony Falabella
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: