I'm doing some testing with RabbitMQ, ActiveMQ "Classic" and ActiveMQ Artemis in a Windows .NET environment. RabbitMQ and ActiveMQ "Classic" ship with a web interface where you can see information about your broker, queues, messages etc., but ActiveMQ Artemis does not. I really want to be able to monitor my ActiveMQ Artemis broker in a web interface or at the very least with some cmd/PowerShell commands.
I've read on this page about some third-party tools that can be used to monitor an ActiveMQ instance and I assumed that it also applied to Artemis. Unfortunately, I have not been able to get these third-party tools to work. Some of them don't seem to work well on Windows and some are old/inactive.
My clients are communicating with the brokers through NMS (.NET Messaging API) in C#. If anyone has been able to monitor their Artemis broker, especially on a Windows machine, please let me know how you did it!
EDIT:
I have managed to communicate with the Jolokia REST API now. With a GET request to:
http://username:password#localhost:8161/jolokia/read/org.apache.activemq.artemis:*
I am able to see a bunch of information about my queues such as messages added and consumed. This is nice information that will help me but I would like information about current memory usage and disk usage.
Take a look at the Management chapter of the Artemis manual. As far as I know, the following options are available to you
JMX (Java Management Service)
JMX is a Java API for managing Java servers. There are multiple GUIs that connect to java servers via JMX. The most notable being jConsole. There is a list of other GUIs here or there, or you could build your own
jConsole
jConsole is a GUI application that you can connect to a JMX enabled server. It is a part of the Java JDK, so you probably have it installed already.
Jolokia
Jolokia, tutorial, is a JSON API layer over JMX. It makes the JMX interface accessible over HTTP(S). You may query the information using any HTTP client library. You already figured out this in your question. Again, there are GUIs on top of that, the most notable being
Hawt.io Artemis plugin
Hawt.io is an Angular.js management console. It can be thought of as a GUI for Jolokia.
Artemis 2.6 and newer
Hawt.io plugin is built in, no extra setup necessary.
Artemis 1
There is a hawt.io plugin for Artemis made by Red Hat. Compile the plugin and get a .war file. Artemis contains a built-in Jetty webserver. You need put that war to apache-artemis-1.3.0/web. You also need to download hawtio-default.war from http://hawt.io/getstarted/index.html to the same directory. Then, in the instance directory, edit etc/bootstrap.xml and add these wars to config.
Or you can get Red Hat AMQ 7, currently in Alpha, which has the management plugin built in. Start it up and go to localhost:8161/hawtio. I work for a company that sells that product.
Prometheus and Grafana
There is a repository and an accompanying blogpost that describes Prometheus and Grafana setup with ActiveMQ Artemis, all running in OpenShift.
The jmx exporter for Prometheus contains example config for Artemis 2 to get started.
The simplest and easiest way to monitor the broker is with the ActiveMQ Artemis web console. This was added back in 2.3.0 (released in September 2017). At that time it was based on Hawtio 1, but it was recently updated to Hawtio 2.
The most powerful and flexible way to monitor the broker is to use a metrics plugin. Metrics plugins allow integration with specialized monitoring tools like CloudWatch, Datadog, Dynatrace, Elastic, Prometheus, etc. A Prometheus metrics plugin implementation is available. That combined with a Grafana dashboard for visualization and alerting is very powerful.
Related
I'm using JBoss AS7 and can see metrics in the following link in the Admin console in my build environment.
http://localhost:10090/console/App.html#sy-metrics
But we don't have the console running in Production nor JMX.
Does JBoss store the metrics somewhere in the server installation which can be extracted for use? It will be useful to find out the services and the methods which are the biggest bottlenecks so that we can improve them.
There's no store of server metrics - you can use something like JBoss Operations Network (https://www.redhat.com/en/technologies/jboss-middleware/operations-network) to collect them, or if you enable JMX you could probably collect them in Prometheus.
I'm not sure whether you are using Fuse 6 or whether you are using community SwitchYard on top of AS 7 - if you're using Fuse 6, you can probably access the JMX beans through hawtio's jolokia instance.
I know that Apache Camel is java open source framework and Jboss Fuse is ESB which act like container to bind camel into its container . However i need to know its differences in some more depth .
Any help will be appreciated .
In simplified terms, camel framework is the set of api's (java code) which are used in system integration projects whereas fuse is the server like tomcat where code is deployed.
"JBoss Fuse combines several technologies like core Enterprise Service Bus capabilities (based on Apache Camel, Apache CXF, Apache ActiveMQ), Apache Karaf and Fabric8 in a single integrated distribution."
Deploy applications utilizing some different configurations and technologies is one of many qualities in Jboss Fuse.
"Camel" as being a rule based routing & mediation engine which can be used inside a full blown ESB, a message broker or a web services smart client. Though if you want to, you could consider that Camel is a small, lightweight embeddable ESB since it can provide many of the common ESB services like smart routing, transformation, mediation, monitoring, orchestration etc.
We should also mention what Camel isn’t. Camel isn’t an enterprise service bus complete(ESB ), although some call Camel a lightweight ESB because of its support for routing, transformation, monitoring, orchestration, and so forth. Camel doesn’t have a container or a reliable message bus, but it can be deployed in one, such as Open-ESB or ServiceMix. For that reason, we prefer to call
Camel an integration framework rather than an ESB.
Recently we have moved our application from websphere to jboss application server.
IBM Http server (IHS) has front ended(proxy) the websphere application server.
Now we want to make changes to httpd.conf to make the IHS to front end the jboss. So whats the configuration to be done at IHS server to act like reverse proxy for JBOSS application server?
There's really no reason to do this, because IBM HTTP Server is only ever supported when it's used with IBM software that it was bundled with.
If you do do it, you're nearly alone in doing so and w/o the assistance of IBM.
Technically, you could use mod_proxy_balancer and mod_proxy_http just like any other Apache-based server, but they're not as well maintained because they are only used in one very obscure/withdrawn IBM product that bundles IHS. It's a basic proxy configuration for Apache and not really worth going into detail here.
The best option for JBoss AS/Wildfly application server proxy for you is Apache HTTP Server with mod_cluster.
Community
You can give it a try with Fedora: mod_cluster package
And there is an example on how to compile it from sources and configure it with Apache HTTP Server from scratch: example, recorded terminal session. It also operates on Windows and Solaris.
Why mod_cluster over mod_jk/mod_proxy?
The main benefit of mod_cluster over mod_proxy*balancer / mod_jk solutions is that both JBoss AS and Wildfly contain mod_cluster subsystems that automatically report deployed contexts and life cycle events to the mod_cluster balancer in Apache HTTP Server. JBoss AS/Wildfly workers join Apache HTTP Server balancer automatically, you don't have to reconfigure anything in your httpd.conf nor restart httpd when you add another JBoss AS/Wildfly worker.
Current load report is also a part of these service messages. One may use several different load metrics within JBoss AS/Wildfly, e.g. heap utilization, CPU load, number of currently open sessions, or one could easily implement a custom load metric.
The result is a high-throughput dynamic load balancer that takes into account actual utilization of your JBoss AS/Wildfly workers.
Commercial support
If you need a fully supported solution for mod_cluster balancer, both Red Hat JBoss Web Server, i.e. Apache HTTP Server, mod_cluster, OpenSSL, Tomcat 7, Tomcat 8, mod_jk, ModSecurity, and Red Hat JBoss Enterprise Application Platform (EAP), i.e. application server built on Wildfly 10+ or AS 7+, entitle you to fully supported mod_cluster balancer fronting either Tomcat workers or EAP workers.
Full Disclosure: I am an engineer at Red Hat
I would like to avoid dependency on ActiveMQ. Is there a way to make JBossFuse to use WebSphereMQ ? (I'm assuming activeMQ is required for framework to run - internal dependency)
The description on jboss fuse site reads like..
Core messaging is provided by Apache ActiveMQ, services framework (SOAP, XML/HTTP, RESTful HTTP)...
PS:
Arguements like "it would be innefficient, expensive" etc, need not be considered at this stage. Reason for prefering WebSphereMQ is beyond my control.
No you can use JBoss Fuse without ActiveMQ at all. For example the minimal distribution does not come with AMQ pre-installed.
JBoss Fuse allows you to slice and dice what you want pre-installed.
If you want to use WebSphereMQ then you can do that, though that would be under the assumption that WebSphereMQ as a server is running in another JVM / box. And that JBoss Fuse would act as a client to that broker. If so you can install the WebSphereMQ Java Client JARs in Jboss Fuse and use that.
We are currently using JMS queue in Weblogic.
Can we use same JMS queue in Websphere as part of weblogic to websphere migration.
Is there any other concept available in websphere which can replace JMS queue?
WebSphere Application Server has a built-in JMS provider, due to the Java EE standard which defines it as mandatory (as Arjan Tijms already stated).
Setting up the JMS provider requires a so called Service Integration Bus, which is a simple Messaging Bus inside WebSphere. The Service Integration Bus also allows to setup High Available JMS queues/topics when using WebSphere Application Server Network Deployment.
Using this queues/topics outside of a WebSphere context - by putting messages into the queues from external clients or reading them from external clients - is hard.
Mainly due to the WebSphere internal CORBA communication it is quite tricky to setup a working and stable
configuration - and you need to know some internal WebSphere tricks.
My recommandation is to use internal jms configuration only for applications which are deployed on the same WebSphere Application Server-Configuration.
If you really need external access to the JMS queues/topics, you should write a adapter to access it.
This blog post describes in detail how to setup a simple WebSphere internal JMS configuration.
WebSphere has indeed an internal JMS provider. It's accessed using the SIB (Service Integration Bus). See http://www.packtpub.com/article/messaging-with-websphere-application-server-7.0-part1
WepSphere has JMS queues as well. Are you wanting to have the queue running within WebSphere, or are you trying to point to a queue running elsewhere?
Yes, you can.
Configuration depends on your JMS System.
If your JMS Middleware is running external like ApacheMQ or Swift JMS, you can normally install an Resource Adapter and then use that specific configuration (at least for the Jms configuration). Then you can use Websphere's JMS Configuration (like Queues and Topics) and therefor your normal MDB configuration.
Besides ActivationSpec (like above) at least with Websphere MQ you could use Listener Ports. I don't know if Listener Ports are available for other JMS Products.
If you want to use a built in Messaging System, you can use SIB I guess.
So plenty of options depending on your System.
A JMS provider is mandated by the Java EE specs so every application server has an inbuilt JMS Provider.
You have to make the right calls about your application needs. There might be valid reasons to use an external JMS provider such as WebSphere MQ.