Arjan Moraal wrote:
>
> Hi Hadrian,
>
>
> Hadrian Zbarcea wrote:
>>
>> Thanks for your interest in Camel. Enabling JMX in your code is fairly
>> easy. This is what you have to do:
>>
>
> Thanks, I've got it working now.
> Can't find the actual number of messages in a seda queue though, the seda
> endpoints just have an uri attribute at the moment.
> But I guess adding current number of messages is part of the work to be
> done for CAMEL-285
>
I managed to include the number of messages in the seda queue by adding the
following method to ManagedEndpoint.java:
@ManagedAttribute(description = "Messages In Queue")
public int getMessagesInQueue() throws Exception {
if (endpoint instanceof SedaEndpoint) {
return ((SedaEndpoint)endpoint).getQueue().size();
} else {
return -1;
}
}
Not really an elegant solution, but it works for us for the moment.
Thanks,
Arjan
--
View this message in context:
http://www.nabble.com/Inspecting-seda-queues-tp14685106s22882p14713961.html
Sent from the Camel - Users mailing list archive at Nabble.com.