How can i delete destination from activemq - activemq

How can i delete a queue from activemq using java.Can any one provide any samples regarding this.I have googled it but i didn't find the correct solution.

This SO Thread, and particulary BOdays answer:
ActiveMQ delete queue from java
Points to this blog post by the same author:
http://www.consulting-notes.com/2010/08/monitoring-and-managing-activemq-with.html
which shows how to this using JMX/Java.
Enjoy

Related

Is it possible to use RabbitMQ streams with Celery?

RabbitMQ introduced streams last year. They claim streams work with AMQP 0.9 and 1.0 as well as mentioned here. That is, theoretically we should be able to create a queue backed by a stream, connect as many workers we need to fan-out to the queue and each worker should get the message delivered.
My question is, has anyone tried to use streams with celery yet? If so, please share any info on how to configure streams in Celery and your experience with them so far. There are unfortunately no blog posts nor any documentation I could find on this topic. I am hoping this post brings together all this information in one place.
The big advantage of streams is they allow large fan-out using the existing infra of RabbitMQ + Celery.
As far as I am aware of there is no way Celery can utilise streams. However, you can probably spin up a long running Celery task that processes particular stream. This is probably reason why nobody attempted (or better say recorded as a blog post or something similar) to do this. - Why bother using Celery for something it is not made for?

Is it possible to find if a new topic is created in activemq

I am developing a system which, if someone creates a topic in ActiveMQ, is required to detect the new creation of a topic by a user logging in and create a Java instance which will subscribe to that topic to talk to the user.
What is the best way?
I know there is DestinationSource by which I can iterate over the currently generated topics or queues so that
I can find if a given topic is new or not.
Is this iteration over topic list is the best way to see if there are the new topic generated?
Just subscribe to: ActiveMQ.Advisory.Topic
Then you get a datastructure DestinationInfo each time a topic is created or deleted.

RabbitMQ Queue peeking

I am new to RabbitMQ and I have a question on get messages option in management plugin. It says "Clicking 'Get Message(s)' will consume messages from the queue. If requeue is set, the message will be re-added to the queue, but ordering will not be preserved and 'redelivered' will be set."
This article says
In the next version of rabbit (after v2.6.1) the order will not be
destroyed when requeueing messages. Messages will be requeued to the
front of the queue, meaning that you can "peek" at the head of the
queue. You can make use of the management interface or use an AMQP
client to do this.
So why management plugin says the ordering will not be preserved? I am just trying to understand which is one correct?
Thanks
I got a reply from RabbitMQ team. Here is what they say...
On 25/04/13 01:05, Prazzy wrote:
So why management plugin says the ordering will not be preserved? I am
just trying to understand which is one correct?
The management plugin did not get updated it seems. I'll fix that.
Thanks for pointing it out.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
The management plugin is wrong.
As the response from the RabbitMQ team said, the answer to your question is that the management plug-in is mistaken. The behavior was changed in 2.6.1 to re-queue messages to as close to the original order as possible - which in this case would almost certainly be at the head of the queue.
Beware of side-effects.
As this answer points out, however, "peeking" is a rather mild-sounding term for what is actually happening: a message is (however briefly) being removed from the queue, then put back. During this brief span of time, it is possible that another message will be delivered to a consumer, in which case your "peeked" message will still go back to the head, but messages may be processed out of order.

How can I get a list of the topics from a ActiveMQ broker?

I found this on ActiveMQ tutorial: http://activemq.apache.org/how-can-i-get-a-list-of-the-topics-and-queues-in-a-broker.html
But I really cannot figure out how to get the topics. Can you give me an example, I mean, programmatically?
The answer depends a bit on what you are looking to do here. ActiveMQ has extensive JMX APIs for monitoring an managing the broker, there's a ton of articles out there on using them to list queues and topics, a quick google search found this one. You can also take advantage of ActiveMQ's Advisory Topics if you don't want to use JMX.

ActiveMQ startup guide

I am new to activeMQ. I want to make a simple application in which one EJB3 sends a message to ActiveMQ and its received and retrieved in MessageDrivenBean. There are so many possibilities to do that. And i an quite confused with so many example. Can anyone point to a good link for creating such application. I want to use ActiveMQ5.5.1 and JBoss6.0.0. And what are the known issues with this combination.
Any help will be appreciated.
thanks
you should start with some of the Fuse webinars/tutorials...
http://fusesource.com/enterprise-support/getting-started/
also, here is a guide to integrating AMQ/JBoss...
http://activemq.apache.org/jboss-integration.html
The first chapter to the ActiveMQ in Action book is free and offers a good quick introduction.