How to batch process RabbitMQ messages in Quarkus - rabbitmq

Is it possible to batch process RabbitMQ messages with Quarkus?
Based on their documentation it seems that it's currently not supported and there is no information on if it's planned.

Related

clear messages from rabbitMQ queue in mule 3

My requirement is to clear all the messages from queue before processing the flow or publishing anything in the queue.
We are using rabbitMQ and due to some reason messages are stucked in the queue and because of that we are facing some issue when we are counting the queue based on the messages. so for the next time before processing we have to clear the queue.
Here we have multiple queue like slave1, slave2,slave3 and when api will be triggered in the process section we have to clear the queue.
Kindly suggest how we can do this in mule3.
Mule 3 has a generic AMQP connector. It does not support administrative commands from a specific implementation like RabbitMQ, so you can't use the connector.
You could use RabbitMQ REST API and call it using the HTTP Request connector. See this previous answer to see how to delete queues with Curl, then implement the same request with HTTP Request: https://stackoverflow.com/a/29148299/721855

Find queue that had ready messages in past in RabbitMQ

On a RabbitMQ instance, how can I find which queue had ready messages in a time other than right now? For example, take a look at figure below:
On Queues tab, I can sort queues by Ready Messages, and see which queue has ready messages right now. But if there was just some short term misbehavior in my services some seconds ago, I would miss what queue it was.
Those metrics are gathered/stored by the management plugin.
The stats provided by RabbitMQ are explained in RabbitMQ metrics
RabbitMQ has several resources to integrate with different monitoring tools

Get dump of fuse activemq messages

I am running a production application with fuse esb and using fuse provided activemq queues. There are 100k messages in one of my queues and I need to get a dump of those messages without removing them from the queue. What is the method to get a dump of those messages.
I used activemq:browse karaf command and directed output to file.But it did not give me all the messages. Only 4000 messages were written to a file.
ActiveMQ cannot browse extremely deep Queues so you won't likely be able to view them all. The browse operation is limited to what can fit into the broker memory and by the maxBrowsePageSize setting.
There is no tooling to dump the contents of the message store offered in ActiveMQ. A broker is not a database and should not be treated as one, messages are meant for consumers to consume.

Checking ActiveMQ queue is empty from JMeter

I am running a performance test using JMeter for our application and the there is some asynchronous processing in the form of events on an ActiveMQ queue. I want to wait for the ActiveMQ queue to be empty before recording the statistics for my test. Is there a good way to do that?
I have explored the JMS Producer/Consumers in JMeter 2.10 but they consume messages off the queue which is not what I want as it modifies the original flow of the application. Is there a way to monitor the draining of the queue without consuming the messages of ActiveMQ?
I am using ActiveMQ 5.8 and JMeter 2.10
I was able to monitor ActiveMQ using the HTTP Request to poll the ActiveMQ web console and get the state of all the queues in XML format. After that I used XPATH to extract the size of the queue I was interested in. The snapshots below show the configuration which I was finally able to use. The XPATH expression which I used was
/queues/queue[#name='${queueName}']/stats/#size
One additional thing which I has to do was to setup basic HTTP authentication to be able to connect to the ActiveMQ web console.
The MBean solution by Mahesh should also work if JMX is enabled on the server but it is not enabled by default.
I have documented it in detail here
You can get the pending messages in that queue using the MBean
"org.apache.activemq:BrokerName=host1,Type=Queue,Destination=dest1"
attribute: "QueueSize"
After checking once every few seconds and the value being not more than zero, you can start recording the statistics.
You can create a simple Java class that consumes all messages from the queue. JMeter can run it before tests.

Deploying java client, RabbitMQ, and Celery to server

I have a Java API on my server, and I want it to create tasks and add them to Celery via RabbitMQ. I followed the following tutorial, http://www.rabbitmq.com/tutorials/tutorial-two-python.html, where I used java for the client (send.java) and python to receive (receive.py). In receive.py, where the callback method is invoked, I call a method that I've annotated with #celery.task so that the task is added to celery.
I'm wondering how all of this is deployed on a server though, specifically, why there is a receive.py file. Is receive.py a process that must continually run on the server? Is there a way to configure RabbitMQ so that it automatically routes java client tasks to celery?
Thanks!
RabbitMQ is just a message queue. Producers put messages and consumers get them on demand. You can only restrict access for specific queues via RabbitMQ's auth options.
As for deployment: yes, receive.py needs to continuously run. It is Celery's job to do that. See the Workers Guide for info on running a worker.