NSQ Free Message Queue Software
Go-based Open Source & Real-time Distributed Message Queue
NSQ is an open-source real-time distributed message queue with no single point of failure. It is a reliable message delivery service with high availability.
NSQ is a realtime distributed messaging platform operatng at a scale. It handles huge number of messages every day, providing fault tolerance and high availability with a reliable messages delivery. It provides distributed and decentralized topologies without single points of failure. Operationally, NSQ best message queue is easy to install, configure and deploy. NSQ messages can be JSON, MsgPack, Protocol Buffers or anyother data format to achieve maximum flexibility. Official Go and Python client libraries are also available.
One of the design goal of NSQ message queue system is to bound the number of messages kept in memory. Topics, distinct stream of data and channels, logical grouping of streams or consumers subscribed to a given topic are the core primitives of NSQ. NSQ message queuing service is composed of 3 daemons: nsqd is the daemon that receives, buffers, and delivers messages to clients. nsqlookupd serves client requests to find the topics location and manages cluster metadata. It provides runtime consistent discovery service for consumers to find nsqd producers for a specific topic. nsqadmin is a web service UI for the cluster realtime administrative tasks of your NSQ cluster.
NSQ simple and open source message broker runs on:
- golang version 1.13+
- gpm version 1.4+
Some of the key features of NSQ message queue software are listed below:
- Supports distributed topologies with no SPOF
- Messages can be configured in persistent mode
- NSQ adopts the mode of memory and hard disk
- Messages persist in memory when server restarts
- Each message is delivered at least once
- Horizontally scalable
- Low latency push based message delivery
- Primarily in-memory messages queue
- TLS Transport layer security
- Runtime discovery service to find producers
- Data format agnostic
- Robust cluster administration interface
- Open Source
Install NSQ on Ubuntu
NSQ is best message broker and easy to get started realtime distributed messaging platform. First, ensure that all the depency packages of NSQ are installed and up to date on your system. NSQ all parameters are specified on the command line and compiled NSQ binaries have no runtime dependency. Below guide covers NSQ installation on Debian and Ubuntu including distributions based on them. The following below instructions will run a NSQ cluster on your local machine. NSQ uses go modules to produce reliable builds so use below commands for compiling and to setup NSQ:
git clone https://github.com/nsqio/nsq cd nsq make
There are three separate binaries nsqlookupd, nsqd and nsqadmin that need to be installed and running. So, in one shell, start nsqlookupd using:
In second shell of terminal, start nsqd using:
You can also add –broadcast-address=127.0.0.1. Most of the debugging, analysis, and administration is done via nsqadmin. So, start nsqadmin in new shell by running:
Next, publish an initial message using:
curl -d 'hello world 1' 'http://127.0.0.1:4151/pub?topic=test'
Start nsq_to_file in another shell with command:
nsq_to_file --topic=test --output-dir=/tmp --lookupd-http-address=127.0.0.1:4161
Finally, publish more messages to nsqd like:
curl -d 'hello world 2' 'http://127.0.0.1:4151/pub?topic=test' curl -d 'hello world 3' 'http://127.0.0.1:4151/pub?topic=test'
For testing run command in terminal:
For realtime debugging and monitoring below command also works very well:
watch -n 0.5 "curl -s http://127.0.0.1:4151/stats"
Finally, in your favourite web browser open http://127.0.0.1:4171/ to verify and view the nsqadmin UI and see statistics. Please also check the contents of the log files (test.*.log) written into /tmp directory.
Congratulations! You have successfully installed NSQ on ubuntu system. Enjoy!
What is NSQ?
NSQ is an open source real-time distributed messaging platform that handles millions of messages every day. It delivers reliable messages with no fault tolerance and high availability.
Is NSQ open source?
NSQ is a best open source message queue and real-time distributed messaging platform. NSQ source code repository is available at Github.
Is NSQ free?
NSQ is a free to use and dowload distributed message queue platform.
What is nsq vs kafka?
NSQ and Kafka are both message queuing services. NSQ is a simpler to configure and more easy to deploy message queue platform while Kafka ensures strict guarantees and reliability with no data loss.
In what language is NSQ written?
NSQ is written in Go programming language.