0

We are using Spring XD, getting some JSON data , need to create tap and need to do sum of the records by using groovy script..

also need to some aggregate function like Min, Max by using groovy script..

Any one having idea like how to do this..

user3656330
  • 171
  • 1
  • 4
  • 9

1 Answers1

3

Is this something that cannot be done with the built in metrics? e.g., rich gauge?

Other than that you can

1) bind a groovy script to the script, transform or filter processor modules. e.g.,

http://docs.spring.io/spring-xd/docs/1.0.0.M6/reference/html/#transform

These modules use spring-integration-groovy so the script variables headers and payload are bound automatically to the message content.

2) Write a custom module that uses spring-integration-groovy script support directly.

dturanski
  • 1,723
  • 1
  • 13
  • 8