1
@JmsListener(destination = "myListener")
    public void receive(Event even) {

            if (event.myObj().isComp()) {
                service1.m1(even);
            }
            if (event.myObj2().isdone()) {
                service2.m2(event);
            }
    }

I tried various combinations, and one of them is below

@Bean
    public IntegrationFlow flow1() {
        return IntegrationFlows
                .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("incomingQueue"))
                .<Event>filter(e -> ((Event)e).myObj().isComp()).handle(service1, "m1")
                .<Event>filter(e -> ((Event)e).myObj2().isdone()).handle(service2, "m2")//looks like its not called
                .get();
    }

But it does not executes on 2nd filter/condition. Please suggest what I am missing here

alexbt
  • 16,415
  • 6
  • 78
  • 87
lowLatency
  • 5,534
  • 12
  • 44
  • 70

1 Answers1

1

It worked, after I put @ServiceActivator annotation on m1 as well as m2. My bad, I missed this annotation while converting code to SI

lowLatency
  • 5,534
  • 12
  • 44
  • 70
  • Well, actually that isn't good. You specify an explicit method name for `handle()`, therefore exactly that method can be called, independently of the annotation. Please, share a StackTrace on the matter. Also how does your `service2.m2()` declaration look? – Artem Bilan Sep 02 '16 at 19:13