What is the best alternative way of monitoring apache Active MQ other than using JMX API - apache

I have tried and tested the JMX API and it is pretty simple to use and provides a vast number of statistics required for monitoring ActiveMQ.
But the problem is, i dont want to monitor my ActiveMQ remotely and also i dont want to use another API.To be more precise, i want to use the JMS API itself to get statistics related to various destinations and the broker itself.
Advisory messages seem to be an alternative but they provide limited Amount of Administrative Messages to monitor.
Any input is highly appreciated...

There is no built-in support for this. But you can implement a JMS topic which publishes the monitoring data every few seconds. Make the connection non-persistent so that it doesn't pile up when there are no listeners or when they loose connection.
Now you can write a client that connects to this topic and it will receive updates.

AMQ-2379 resulted in a broker plugin for grabbing statistics from destinations by sending a simple JMS message. Check out the docs that show how to use it here:
http://activemq.apache.org/statisticsplugin.html
The statistics plugin is available in the 5.3 release.

You can checkout this http://issues.apache.org/activemq/browse/AMQ-2379, it will be avaiable in upcoming 5.3.0 release

There's a blog post queued up to go on http://issues.apache.org/activemq/browse/AMQ-2379 - will post it in a couple of days or so

Related

rabbitmq integration to Splunk

Recently I installed Rabbit MQ in Centos8 for my company. We also using Splunk Enterprise so we wants to integrate our Rabbit MQ to Splunk and we wants to see, search, check our logs which is coming from Rabbit MQ to in Splunk . How can I do that I don't know. I google it but I didn't get info about it. May anybody help to me for this goal ? Thank you
The scripts at https://github.com/jerrykuch/rabbitmq-splunk are somewhat old, but should still be functional. It can leverage the HTTP API to pull in the relevant data. That page also lists the recommended files to monitor
Always check Splunkbase when looking for ingesting data types - often there exist apps and add-ons that will do what you're looking for
Here are two related to RabbiMQ:
JMS Messaging Modular Input - https://splunkbase.splunk.com/app/1317/#/details
AMQP Messaging Modular Input - https://splunkbase.splunk.com/app/1812/#/details

Automatic timestamp generator plugin on RabbitMQ broker

I've searched a lot on Google or directly on Stackoverflow and I know that AMQP's timestamp message property must be filled by the producer.
But I want to know if there is some plugin that writes out on this parameter based on the broker's local timestamp automatic when the message is putted on each queue by a topic exchange.
I'm on a situation that neither producer's nor consumer's timestamps are reliable. Only the broker has a trustworthy watch.
I'm not an Erlang programmer but, if there is no known plugin to do that, I need some help. How could I start to write it myself?
I just need to:
Publish some message by someone who doesn't rely on his local timestamp.
Put this message on each queue mapped on my broker's topic exchange (with it's local timestamp, now I need only this step)
Finally, anyone for whom this message was addressed to is able to get the message and see the exact time this message landed on the broker.
I'm using RabbitMQ 3.3.4, Erlang R16B03, on an Ubuntu's new Amazon AWS machine.
Thanks
First try official Plugin Development Guide. Also look through official and community plugins and their sources. In addition you can always googled any other rabbitmq plugins not listed in lists above. Finally, there are official RabbitMQ mailing list on google groups (replaced http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss).

Understanding Rabbitmq permissions

I'm attempting to set up a pub/sub system. My technical director has suggested using Rabbitmq and STOMP for the project I've been assigned.
In this system I want exchanges to be created on the server side and passed to the user to subscribe to. I want a user to subscribe to an exchange and receive information as it becomes available. I do not want the client to have the ability to subscribe to arbitrary exchanges (or routing keys for topic exchanges, I'm not sure what system I want to use yet).
For example, if someone works for a company widgetInk, when they logged in to our website they would receive a connection to the widgetInk.whatever exchange and AllUsers.whatever exchange, but that's it. if the Client side attempted to subscribe to something else they'd get an error.
I've gone through all of the RabbitMQ tutorials and I've looked through their how to section. I found this basic article on access control, but having read it three times now I still don't know if rabbitmq is a good fit for my requirements.
Can Rabbitmq be configured for my requirements? What resources can I use to learn about Rabbitmq's permission system? Has anyone build or used a system like this? Would it be in my best interest to switch to ZeroMQ or ActiveMQ?
I'd like to mention another platform you might use: Autobahn (Open-Source) or WebMQ (based on Autobahn).
WebMQ provides these features (besides a lot of other out of the box):
PubSub over WebSocket (WAMP)
Authentication of client sessions (WAMP-CRA)
fine-grained configurable authorization for topics
If you want to go the Open-source/build-your-own road, here are some tutorials. If you want an integrated, commercially supported product with Web UI for configuration/administration, please get in contact.
Disclaimer: I am creator of Autobahn/WAMP and work for Tavendo.

What solution should I use for this webapp with websockets. ActiveMQ?

I'm currently in the middle of developing a webapplication which needs a websocket connection to receive notifications of events from the server.
The clients are separated in groups and all the clients in a group must receive the same event notifications.
I thought that ActiveMQ could probably support this model, using different queues for each group of clients. It would also be relatively easy to push events to ActiveMQ using stomp, and then use stomp-over-websockets for the clients.
The problem I see is that messages should not be consumed by only one client, but distributed to all the clients connected to the queue.
Also the queue should not be stored. If a client is not connected when the event is generated, then it will never receive it.
I don't know ActiveMQ that much, so I'm not sure if this is possible or if there is another easy solution that could be used instead of writing my own message server.
Thanks
ActiveMQ 5.4.1 supports WebSockets natively (just like Stomp, JMS, etc.).
There is the concept of queues (you mentioned these), but also of topics.
In a queue, a single message will be received by exactly one consumer, in a topic
it goes to all the subscribers. See: http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
There are some Stomp-WebSocket JS libraries floating around. Kaazing has a bundle that includes ActiveMQ and supports JMS API/Stomp protocol over WebSockets with support for older browsers, different client technologies, and Cross-Site security.
Look at Pusher, otherwise you'll need something that supports topic based pub/sub. You could look at Redis or RabbitMQ

How can I observe what's happening under the hood of ActiveMQ?

I'm experiencing an issue with ActiveMQ and would like to trace/view all ActiveMQ activity. The only log file I can find is one associated with persistent data (if this is turned on). Are there any other log files I view or generate to tell me what's happening under the hood of ActiveMQ and why my consumers aren't consuming messages? Any other suggestions?
Thanks in advance!
activemq has a jmx interface that you can connect to.
this gives us access to consumer counts messages queued dequeue and all sorts of data on memory usage etc.
http://activemq.apache.org/jmx.html
Has all the details to get you started.
I find it excellent in finding out whats going on with activemq.
A quick firing up of jconsole and you will be well on your way to finding out what is going on.
Paul
Agreed. Also you can add the logging interceptor which helps.
Finally for browsing messages, moving them, creating/deleting queues and sending message I highly recommend the new web console for ActiveMQ, Camel and many other plugins: hawtio
Try HawtIO. Assuming you are not using Active MQ 5.9 you can add this feature to your broker. It is a much better web console and a good JMX monitoring utility as well.
http://www.christianposta.com/blog/?p=315