In my previous article, I talked about a simple profanity detector that I opened sourced on GitHub. Since launching that code example I have had a lot of people get in touch with some suggestions for new features as they wanted to make use of the library. There were some really good suggestions, so I have implemented them all. In this post, I will walk through what was requested and what I have added to the library.
Using the Library via Nuget
The first suggestion was to have NuGet support for the library as some people don’t want to clone repositories and deal with the source directly, so I have made the compiled Profanity Detector library available.
You can include the library directly from your package manager in Visual Studio, Visual Studio for Mac, VS Core, or Rider. The documentation for using the library is available on the Profanity Detector GitHub page.
Back in August, I had the pleasure of speaking at NDC Sydney, which I wrote about in a previous post. The videos of those talks are now both available and shown below. The first in my .NET Data Security talk about cryptography and the 2nd video is my social engineering talk.
I have been nice and busy since leaving Buying Butler and RightIndem. Along with my co-founder, we are setting up a new FinTech startup called Ladder Pay. LadderPay is an innovative payment platform that unifies Business to Business, Business to Consumer, and Consumer to Business payments into one product with an emphasis on security and compliance backed by blockchain technology. I can’t write too much about it just yet as we are still working through a lot of details, but I am very excited about it. We have 3 potential customers who will use the platform first, so we are getting things ready for that.
My main role at the moment has been developing the backend platform so I have been spending most of my time coding, which has been really nice to get back into full-time. The product is being developed in Microsofts .NET Core 2 platform and deployed onto Microsoft Azure. I will write more about this in the future, it’s a little too early to reveal too much at the moment.
I am mostly working from home on this at the moment, but we are looking for an office to work from. We have found a place we like, but are still sorting through the details. I always found working from home difficult, but since working on LadderPay, I have set up in my dining room and have a really nice setup which is nice on a sunny day as I can open the doors to the garden, so I am really enjoying this at the moment.
Whilst I am doing LadderPay during the day, I am also continuing on my Pluralsight courses in the evening. I have signed up for a new course that is all about the algorithms that are used to build up blockchain. A challenging but very interesting course. I can’t wait to share more details.
In the previous article we looked at administering RabbitMQ from the command line. In this next article we will set-up a basic queue and also send and receive a basic message via the management portal.
Before we go and dive into some code and look at our samples, let’s work through a very simple scenario where we create an exchange and a queue and bind them together via the management portal. We will then send a message to the exchange and pull it from the queue. It is a very simple example, but it serves as a good introduction before we tackle some real world scenarios.
First of all go to the management portal and click on the exchanges tab. Once you are on the exchanges page, open up the ‘Add a new exchange’ section and fill it in as shown in the following screenshot. You will then need to click on the “Add exchange” button to add the exchange.
This will add a new ‘direct’ exchange to the list of exchanges. Now click on the Queues tab at the top of the page to go to the queue list. Open up the ‘Add a new queue’ section and fill it in as per the following screenshot. Now click the “Add queue” button.
In the previous article we looked the Rabbit MQ management portal in more detail. In this article we will look at configuring RabbitMQ from the command line.
As well as using the web based management portal to administer RabbitMQ you can also use the command line (rabbitmqctrl.bat) interface. In this chapter we will demonstrate some of the basic features that you may need to use most frequently, but for a more exhaustive list of commands you can read the RabbitMQ manual page for the rabbitmqctrl.bat tool.
At a high level rabbitmqctrl lets you manage the run state of the message broker, manage your RabbitMQ clusters, administer users and permissions, manage policies and list exchanges, bindings, and queues.
Let’s work through a simple example of stopping and starting the RabbitMQ broker and checking the broker status.
Open up a command prompt and navigate to “C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.4\sbin
From the command prompt type:
You will see the following output in the command line window.
To stop the RabbitMQ broker from running you type the following into the command line:
This will give you console output that looks as following:
If you run the status command line again by typing:
You will see that the RabbitMQ service has stopped. This will mean RabbitMQ will stop receiving and processing messages. If you have not setup durable queues and messages you will lose any messages already in the system.
The management portal is split into different screens that are selectable with the menu bar at the top of the screen. The first screen you will see is the overview page. This acts as a dashboard view showing you how many messages are in the broker, and the message throughput rate.
This screen is useful to have up on a large display so you can see at a glance how RabbitMQ is performing. If, for example, any of your message consumer applications go down, you will start to see a large buildup of undelivered messages which is a good indication that something has gone wrong.
In the image above, you can see on the overview screen that 1 messages was placed onto the queue at 10:49.00. In the chart below this you can see the message rates which is split into Published messages, Delivered messages, Redelivered messages, Acknowledged messages and Delivered messages where no acknowledgement was required.