git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JMX Camel New User Question: where do I put service:jmx:rmi...


Hi

Btw there is also jolokia that can make JMX easier as it can expose
the data via REST over HTTP.
http://www.jolokia.org/

And Jolokia comes out of the box with ActiveMQ.

Then its just standard HTTP and one port you need to be open, and not
as tricky to setup and secure as JMX over RMI can be.


On Thu, Dec 20, 2018 at 5:25 AM Stefan Lisowski <roadworrier@xxxxxxxxx> wrote:
>
> Hi All -
>
> I'm new to Camel. I'm trying to work through this example in the way
> of something like Hello World for a JMX Camel connection.
>
> https://github.com/apache/camel/tree/master/examples/camel-example-jmx
>
> I can build it with maven and mvn camel:run works fine.
>
> But now I want to start tweaking the program to learn how it works and
> applies to my own environment. There's a JMX server here for ActiveMQ,
> and I want to connect to it with this example.
>
> I'm thinking I do this with the RouteBuilder. (MyRouteBuilder.java in
> this example)
>
> There's a "from" line. This looks like the candidate.
>
> // START SNIPPET: e1
> from("jmx:platform?objectDomain=jmxExample&key.name=simpleBean").
> to("log:jmxEvent");
> // END SNIPPET: e1
>
> but how do I put my URI in here? It looks something like:
> service:jmx:rmi:///jndi/rmi://localhost:12345/jmxrmi
>
> I wouldn't expect just pasting it in to the "from" area would work,
> and it doesn't:
> Failed to resolve endpoint:
> service://jmx:rmi:///jndi/rmi://localhost:12345/jmxrmi due to: No
> component found with scheme: service
>
> I should also mention that I need to authenticate, so I have a
> username and password I'll need to enter as well (though no SSL). Am I
> looking in the right place in this example code?
>
> Thanks. I know new-user questions can be painful to endure, so thanks
> for your patience.
>
> RW



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2