Tool for sending messages to ActiveMQ manually - activemq

I have worked on IBM MQ and this is the first project where I am to work on ActiveMQ. After reading basic tutorial I found that both are similar. So I started creating small applications to listen to some queues.
Working with IBM MQ, I used to use RFHUtil tool to browse/send messages to queue which provided features to set message headers as well.
In activeMQ I am sending messages from localhost admin console. I do not find options to set message header from here. For example if I want to set source system in the message header. Is there any way/tool to get this feature on activeMQ?

I like hermes jms
Be sure to pick the Head version if you want support for headers. Its pretty similar to RFHUtil but allows "all" JMS providers.
http://hermesjms.com/patches/
I also made a command line tool for the same task which is handy, called A.

Related

Read/write message using RFHUTILC into ActiveMQ

Can we write and read the message using RFHUTILC into ActiveMQ?
I know RFHUTILC is used for writing and reading messages into IBM MQ but my requirement is to pull/Read a message from Apache ActiveMQ.
RFHUTILC won't work, as it only talks IBM MQ's protocol, which is non-standard and specific to IBM MQ. ActiveMQ supports a number of standard and open source protocols, as #Justin Bertram mentioned.
RFHUTIL is IBM MQ only. I made a smilar tool called A that has been around sometime for ActiveMQ (generic JMS with OpenWire/ActiveMQ, HornetQ and AMQP protocols bundled) that you can use instead. It's command line though, no GUI. Free/open source.
https://github.com/fmtn/a
There are of course other similar utilities with GUI, such as Hawt.IO among others. Some are a bit outdated though (Hermes JMS).

ActiveMQ topic send automatically

I have some subscribers that they are listening to "mytopic"...I send message to them by browser UI just like attached image
but now I want to do this work in code environment
what should I do and whats that code and methods?
-----> attached image
Thanks
You should have mentioned what programming language you want to use. Every language may offer a different API and specification.
In case of using Java, you can simply program according to the JMS specification
https://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html
Also, the Apache ActiveMQ installation comes with a few examples that you can use as a reference. E.g. see
examples/openwire/swissarmy/src/TopicPublisher.java
You should have a look at ActiveMQ Protocols - for example you can use the ActiveMQ REST API to POST messages to the topic or use JMS.
Then you can look at how to use these from a "client" (presumably your central server) perspective.
For REST from Java (say) you could look at this article

move hornetq message from a queue to another without reading it out

We have a use case where we would like to get a certain messages in a queue distributed into other queues after we browse the queue and get the message properties. Can that be done with JMS API for hornetq or should we use a JMX client as that seems to be a possible operation in jvisualvm?
I don't know if I understand You correctly but if You would like to copy from one queue to another only filtered messages You can use bridge.
http://docs.jboss.org/hornetq/2.3.0.CR2/docs/user-manual/html/core-bridges.html
In bridge configuration You can define which messages should be copied from one queue to another
It seems that org.hornetq.api.jms.management.JMSQueueControl from the HornetQ Management API will do the trick. I was hoping for some generic JMS API that would allow that as well but this will work.

Pre-built AMQP and STOMP client (as in GUI client)

I'm looking for a client (as in GUI client, not client library) to play with our MQ server and familiarize myself with its semantics. Something that will send and receive messages at the press of a button (or a text command) and maybe even update me about the status of the server queues and messages. Administration would be a bonus. The UI doesn't have to be graphical (i.e. command line clients are fine).
The server will probably run RabbitMQ so anything RabbitMQ-specific is fine, as is ActiveMQ. But I'd rather have a generic AMQP or STOMP tool.
So, does anything of the sort exist?
I know some management and monitoring tools come with both server distributions, but no clients, right?
For Apache ActiveMQ, there is
the web admin console at http://localhost:8161/admin/
the ApacheActiveMQBrowser project on Sourceforge:
An open source project of developing
Message admin gui based tools for
Apache ActiveMQ.
HermesJMS, it does not mention ActiveMQ 5 (only 3 and 4) on the plugin page, but there is an active user forum
The rabbitmq-management plugin that comes with RabbitMQ (and enabled by rabbitmq-plugins enable rabbitmq_management) has a web-based interface that listens on the port 15672 and can do everything you are (I was) asking for.
Check out the BQL RabbitMQ plugin.
It gives you an SQL-style language for AMQP. For instance,
BQL> create exchange myexchange;
ok
BQL> create durable queue 'myqueue'
ok
BQL> select name,messages from queues where 'durable'=true order by name
----------------------
| name | messages |
----------------------
| myqueue | 0 |
Obviously, it's RabbitMQ specific.
If you're willing to do a bit of coding, you could take a look at the examples in the RabbitMQ Java and .NET clients:
Java examples
.NET examples
They're not quite graphical, but trying to understand them forces you to ask the right questions.
It's been a while, but I remember thinking that the best way to familiarize yourself with AMQP is to read the 0-9-1 spec and write some simple programs; in particular, the protocol documentation on that site gives a lot of examples.
Command line tools (written in C) to send and receive AMQP messages: http://github.com/rmt/amqptools

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

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