Hi Arjan,

Yeah, that would work. I'm glad you got it running. We'll make it nicer with camel-285 :).

Thanks
Hadrian

Arjan Moraal wrote:

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

Reply via email to