service-activator activated only for half messages

Solution 1:

I would say your counting logic is not a part of main flow. So, better to look into a wire-tap pattern and consider to use an <int:outbound-channel-adapter> instead. Just because you not going to return anything from that counting method.

Another approach for calling different endpoints for the same message is an <int:publish-subscribe-channel>.

Right now you declare a DirectChannel with that <int:channel id="channelMQ_MQ">, which has a round-robing distribution strategy by default for its subscribers. That's exactly why you see that odd-even behavior for your subscribers.

Not sure why you are missing that, but you indeed have two subscribers for this direct channel:

<int:service-activator input-channel="channelMQ_MQ"

<int-jms:outbound-channel-adapter   channel="channelMQ_MQ" 

See more in docs: https://docs.spring.io/spring-integration/docs/current/reference/html/core.html#channel-implementations-directchannel