Hi,
is there a possibility to get the size of a queue with the control-bus of Spring Integration?
I wrote a class to start and stop some endpoints with die control-bus. Now I want to get the size of some queues.
I tried it with this statement
but it doesn't work.Code:send(new GenericMessage<String>("@readEventChannel.getQueueSize()"));
Caused by: org.springframework.expression.EvaluationException : The method 'getQueueSize' is not supported by this command processor. If using the Control Bus, consider adding @ManagedOperation or @ManagedAttribute.
When I inject the channel bean to the class, the channel ist not a instance of QueueChannel.
Is there another solution?Code:<si:channel id="readEventChannel" > <si:queue /> </si:channel> <bean id="applicationMonitor" class="com.example.ApplicationMonitor"> <property name="controlChannel" ref="controlChannel" /> <property name="controlOutputChannel" ref="controlOutputChannel" /> <property name="queueList"> <list> <ref bean="readEventChannel" /> </list> </property> </bean>


Reply With Quote
