How to delete rabbitmq shovels through commandline

2,746 views
Skip to first unread message

vinod hy

unread,
Apr 20, 2017, 4:57:08 AM4/20/17
to rabbitmq-users
Hi All,

I created shovels using , rabbitmqctl set_parameter shovel "MyShovel" ......

Now i want to delete it, Can you please tell me on how to achieve it using commandline.


This command, rabbitmqctl eval "rabbit_shovel_status:remove({'/','MyShovel'})." returns Ok. 


But i still dont see shovel getting deleted. 


Please help me if i am doing anything wrong here and also help me in getting the right command to delete the shovel through command line.

I am performing this on windows.

I have enabled SSL on my rabbitmq broker.


Regards,


Vinod H Y


Karl Nilsson

unread,
Apr 20, 2017, 5:10:58 AM4/20/17
to rabbitm...@googlegroups.com
Hi,

Try using the clear_parameter command:

rabbitmqctl clear_parameter {-p vhost} component_name name

see:


and


Cheers
Karl

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ

vinod hy

unread,
Apr 21, 2017, 11:35:33 AM4/21/17
to rabbitmq-users
rabbitmqctl clear_parameter shovel MyShovel.

It works.. Thanks a lot Karl. Really appreciate your help.


On Thursday, 20 April 2017 14:40:58 UTC+5:30, Karl Nilsson wrote:
Hi,

Try using the clear_parameter command:

rabbitmqctl clear_parameter {-p vhost} component_name name

see:


and


Cheers
Karl
On 20 April 2017 at 09:57, vinod hy <hy.vi...@gmail.com> wrote:
Hi All,

I created shovels using , rabbitmqctl set_parameter shovel "MyShovel" ......

Now i want to delete it, Can you please tell me on how to achieve it using commandline.


This command, rabbitmqctl eval "rabbit_shovel_status:remove({'/','MyShovel'})." returns Ok. 


But i still dont see shovel getting deleted. 


Please help me if i am doing anything wrong here and also help me in getting the right command to delete the shovel through command line.

I am performing this on windows.

I have enabled SSL on my rabbitmq broker.


Regards,


Vinod H Y


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

vinod hy

unread,
Apr 24, 2017, 11:38:47 AM4/24/17
to rabbitmq-users
Hi karl,

rabbitmqctl takes time to respond to creation and deletion of shovels. If i have to create a set of 100 shovels, it takes more than 4-5 min to finish creation of shovels in a loop in a batch file.
   i was exploring rabbitmqadmin to see if it can be achieved there. But i dont see that option.

Can you please give your inputs here



Can you please confirm. 


On Thursday, 20 April 2017 14:40:58 UTC+5:30, Karl Nilsson wrote:
Hi,

Try using the clear_parameter command:

rabbitmqctl clear_parameter {-p vhost} component_name name

see:


and


Cheers
Karl
On 20 April 2017 at 09:57, vinod hy <hy.vi...@gmail.com> wrote:
Hi All,

I created shovels using , rabbitmqctl set_parameter shovel "MyShovel" ......

Now i want to delete it, Can you please tell me on how to achieve it using commandline.


This command, rabbitmqctl eval "rabbit_shovel_status:remove({'/','MyShovel'})." returns Ok. 


But i still dont see shovel getting deleted. 


Please help me if i am doing anything wrong here and also help me in getting the right command to delete the shovel through command line.

I am performing this on windows.

I have enabled SSL on my rabbitmq broker.


Regards,


Vinod H Y


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Apr 24, 2017, 11:45:48 AM4/24/17
to rabbitm...@googlegroups.com
Doing 100 things that go over the network sequentially will take time. Either use fewer Shovels
or set them up in parallel. That should be possible (at least I don't see why parallel creation
wouldn't work as Shovels share effectively no state).

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

vinod hy

unread,
Apr 24, 2017, 12:31:48 PM4/24/17
to rabbitmq-users
Hi Michael,


I found rabbitmqadmin usage to delete a single shovel as below,
rabbitmqadmin.py delete parameter component=shovel name=MyShovel .. It responds very quickly within a second

But rabbitmqctl usage to delete as below,
rabbitmqctl clear_parameter shovel myshovel  takes little more time.Close to 6 seconds. 

I feel rabbitmqadmin is faster in response. 

I am trying to find a way to create shovels using rabbitmqadmin. The below command i am using,
rabbitmqadmin.py -V localhost declare parameter component=shovel name=MyShovel value="{""ack-mode"": ""on-publish"",""add-forward-headers"": false,""delete-after"": ""never"",""dest-uri"": [""127.0.0.1""],""dest-exchange"":""TestExchange"",""src-queue"": ""myqueue"",""src-uri"": [""127.0.0.1""]}"

I get error as follows,
*** Not found: /api/parameters/shovel/localhost/MyShovel

Any idea? Please tell me what mistake i am doing here in command. I am performing this on windows.

Michael Klishin

unread,
Apr 24, 2017, 12:36:27 PM4/24/17
to rabbitm...@googlegroups.com
Well, does the vhost "localhost" actually exist? Are you sure that you want to pass "localhost" for vhost and not HTTP API endpoint host?

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

vinod hy

unread,
Apr 24, 2017, 1:13:24 PM4/24/17
to rabbitmq-users
I mentioned that from an example perspective. localhost refers my host where rabbitmq broker is running and its exists.

I just need a working example. Later i will modify according to my requirement. Can you please help me

Michael Klishin

unread,
Apr 24, 2017, 1:32:25 PM4/24/17
to rabbitm...@googlegroups.com
You are passing a hostname for the virtual RabbitMQ host (NOT node hostname) argument.
I suspect that the HTTP API detects that the vhost with that name does not exist and responds accordingly.

in case the different isn't clear.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

vinod hy

unread,
Apr 24, 2017, 1:38:08 PM4/24/17
to rabbitmq-users
i tried this command,

rabbitmqadmin.py declare parameter component=shovel name=MyShovel value="{""ack-mode"": ""on-publish"",""add-forward-headers"": false,""delete-after"": ""never"",""dest-uri"": [""amqp://tester:tester@localhost""],""dest-exchange"":""ControlExchange"",""src-queue"": ""myqueue"",""src-uri"": [""amqp://tester:tester@localhost""]}"

I removed the V localhost parameter.I also changed the source and dest uri declaration. and it works.

Thanks a lot for your time. Hope this is useful for others also..

Egor Fatyushin

unread,
Oct 6, 2020, 6:29:15 AM10/6/20
to rabbitmq-users
Hi Michael,

I'm also trying to add/remove lots of shovels and it takes too much time of course. I've got your point about parallel HTTP API requests/rabbitmqctl commands running. But is it possible to run batch requests (I mean N shovels/any other parameters per single HTTP request)?

понедельник, 24 апреля 2017 г. в 18:45:48 UTC+3, Michael Klishin:



--
Reply all
Reply to author
Forward
0 new messages