This Microsoft PowerShell module contains Cmdlets to work with RabbitMQ queues, send and receive messages. It uses a wrapper I earlier presented that solved the problem of loading the official RabbitMQ .NET client into a PowerShell session. These Cmdlets further facilitate the handling of sending and receiving of messages via AMQP queues.

You can download the module on GitHub or on NuGet with Install-Package biz.dfch.PS.RabbitMQ.Utilities. Check the Wiki for further description and explanation on how to use the Cmdlets.

CommandType Name
----------- ----
Alias       Connect-RabbitMQ
Alias       Enter-RabbitMQ
Function    Enter-RabbitMQServer
Function    Get-RabbitMQMessage
Function    New-RabbitMQMessage

2 Comments »

  1. My understanding of RabbitMQ is that you always publish to an exchange (which will then have one or more queues bound to it). However your New-Message function asks for a queue name instead of an exchange…am I missing something?

    • Hi Bob, with RabbitMQ and AMQP 0.9.x you have actually two modes of operation:

      you can either use the publish/subscribe scenario where you publish to an exchange and a subscriber receives messages from that exchange through a queue. Multiple subscribers can receive messages from that exchange by each subscriber connecting its own queue to that exchange.

      Or you can have a *direct* connection where the producer of a message sends directly to a queue and the receiver (or multiple receivers) gets the message also from that same queue.
      Both modes have their advantages and disadvantages.

      If you want some kind of message distribution where multiple subscribers receive the same message, you would use an exchange with a *broadcast* option, if you only want to dispatch messages to multiple receivers (each receiver getting a single message at a time and no two receivers getting the same message) you can use the *direct* queue scenario, which RabbitMQ calss work queues.

      For more information have a look at https://www.rabbitmq.com/getstarted.html and see (2) “work queues” and (3) “publish/subscribe”.

      Regards, Ronald

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.