All Projects → youzan → Nsq

youzan / Nsq

Licence: mit
A realtime distributed messaging platform (forked from https://github.com/nsqio/nsq)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Nsq

Nsq
A realtime distributed messaging platform
Stars: ✭ 20,663 (+4240.97%)
Mutual labels:  messaging, queue, message-queue, distributed-systems
Sandglass
Sandglass is a distributed, horizontally scalable, persistent, time sorted message queue.
Stars: ✭ 1,531 (+221.64%)
Mutual labels:  messaging, message-queue, distributed-systems
Nats Server
High-Performance server for NATS.io, the cloud and edge native messaging system.
Stars: ✭ 10,223 (+2047.69%)
Mutual labels:  messaging, message-queue, distributed-systems
Foundatio
Pluggable foundation blocks for building distributed apps.
Stars: ✭ 1,365 (+186.76%)
Mutual labels:  messaging, queue, distributed-systems
Liftbridge
Lightweight, fault-tolerant message streams.
Stars: ✭ 2,175 (+356.93%)
Mutual labels:  messaging, message-queue, distributed-systems
microq
Micro job queue built on mongo
Stars: ✭ 67 (-85.92%)
Mutual labels:  queue, messaging, message-queue
Jocko
Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)
Stars: ✭ 4,445 (+833.82%)
Mutual labels:  messaging, queue, distributed-systems
go-nats-examples
Single repository for go-nats example code. This includes all documentation examples and any common message pattern examples.
Stars: ✭ 99 (-79.2%)
Mutual labels:  messaging, message-queue
horse-messaging
Open Source Messaging Framework. Queues, Channels, Events, Transactions, Distributed Cache
Stars: ✭ 65 (-86.34%)
Mutual labels:  queue, messaging
azure-service-bus-go
Golang library for Azure Service Bus -- https://aka.ms/azsb
Stars: ✭ 67 (-85.92%)
Mutual labels:  queue, messaging
research
research, notes & ideas on various subjects
Stars: ✭ 54 (-88.66%)
Mutual labels:  distributed-systems, messaging
RabbitMQTools
PowerShell module containing cmdlets to manage RabbitMQ.
Stars: ✭ 27 (-94.33%)
Mutual labels:  queue, messaging
gobroker
golang wrapper for all (to-be) kinds of message brokers
Stars: ✭ 15 (-96.85%)
Mutual labels:  queue, messaging
dynamic-queue
The dynamic queue
Stars: ✭ 17 (-96.43%)
Mutual labels:  queue, message-queue
aop
AMQP on Pulsar protocol handler
Stars: ✭ 93 (-80.46%)
Mutual labels:  messaging, message-queue
psr-container-messenger
Message bus and queue for Mezzio with Symfony Messenger + Enqueue
Stars: ✭ 24 (-94.96%)
Mutual labels:  messaging, message-queue
fs
[READ-ONLY] Enterprise queue solutions for PHP. Filesystem transport.
Stars: ✭ 32 (-93.28%)
Mutual labels:  queue, message-queue
orkid-node
Reliable and modern Redis Streams based task queue for Node.js 🤖
Stars: ✭ 61 (-87.18%)
Mutual labels:  queue, message-queue
coolbeans
Coolbeans is a distributed work queue that implements the beanstalkd protocol.
Stars: ✭ 56 (-88.24%)
Mutual labels:  distributed-systems, queue
Naos
A mildly opiniated modern cloud service architecture blueprint + reference implementation
Stars: ✭ 19 (-96.01%)
Mutual labels:  distributed-systems, messaging

  • Source: https://github.com/youzan/nsq
  • Issues: https://github.com/youzan/nsq/issues
  • Mailing List: [email protected]
  • IRC: #nsq on freenode
  • Docs: http://nsq.io
  • Twitter: @nsqio, @absolute8511

Go Build Status GitHub release Go Report Card codecov

NSQ is a realtime distributed messaging platform designed to operate at scale, handling billions of messages per day.

It promotes distributed and decentralized topologies without single points of failure, enabling fault tolerance and high availability coupled with a reliable message delivery guarantee. See features & guarantees.

Operationally, NSQ is easy to configure and deploy (all parameters are specified on the command line and compiled binaries have no runtime dependencies). For maximum flexibility, it is agnostic to data format (messages can be JSON, MsgPack, Protocol Buffers, or anything else). Official Go and Python libraries are available out of the box (as well as many other client libraries) and, if you're interested in building your own, there's a protocol spec.

We publish binary releases for linux and darwin.

NOTE: master is our development branch and may not be stable at all times.

About this fork

This fork has been moved to https://github.com/youzan/nsq

This fork add many features missing in the original and has been used in Youzan.com. Features:

  • Replication
  • HA
  • Auto balance and migrate
  • Partition
  • Delivery in Order
  • Consume history data
  • Trace the message life-cycle
  • Performance improvement

Deploy Dependency

This fork need the etcd cluster, so to deploy we need set the configure for the nsqd and nsqlookupd. For details please refer to the sample configure files under contrib directory.

Other deploy can be the same as the Official.

有赞NSQ文档索引

用户指南

有赞NSQ用户指南

JavaSDK使用指南

内部实现文档

重构概览

重构实现细节

客户端SDK实现

扩展消息设计

FAQ for this Fork

Can I use the Official client SDK?

Most client SDK can be used to communication with the new server without using the new features and for new features in this fork the new client SDK should be used.

Golang: https://github.com/youzan/go-nsq

Java: https://github.com/youzan/nsqJavaSDK

PHP: https://github.com/youzan/php-nsq-client

Auto topic create has been disabled.

In order to manager the topics by nsqlookupd, we removed the create api on the nsqd. So in order to create a new topic, you need create the topic in the nsqadmin or send the create api to the nsqlookupd as below:

curl -X POST "http://127.0.0.1:4161/topic/create?topic=xxx&partition_num=2&replicator=3&syncdisk=1000"

Explain:
partition_num=2 : topic partition number
replicator=3: topic replica number
syncdisk=1000: fsync disk every syncdisk messages
for ordered topic the query param "orderedmulti=true" is needed.

The new server introduced the partitions but in order to keep compatible with the old clients, each node can hold only one partition of the topic. So the partition_num*replicator should not be great than the nsqd nodes. For the ordered topic, we can create as much as we need partitions. (replicator <= number of nsqd node) Also, the first channel for this topic should be created after the topic is created, otherwise this topic is not allowed to be written.

The log can be adjust dynamically.

This is useful to debug on the fly.

nsqd: curl -X POST "http://127.0.0.1:4151/loglevel/set?loglevel=3"
nsqlookupd: curl -X POST "http://127.0.0.1:4161/loglevel/set?loglevel=3"

The log is much more detail when the log level increased.

Change the consume position to allow consume history or skip some messages.

curl -X POST -d "timestamp:xxxxxxxxx" "http://127.0.0.1:4151/channel/setoffset?topic=xxx&partition=xx&channel=xxx"

Post body explain:
timestamp:xxxx (the seconds since 1970-1-1)
virtual_queue:xxx (the queue offset position from the begin)
msgcount:xxx (the message count from the begin)

For multi nsqd nodes, each node for each partition should be done using the api above.

For more documents

please see the other documents under the doc

In Production

              

              

              

              

              

  

Code of Conduct

Help us keep NSQ open and inclusive. Please read and follow our Code of Conduct.

Authors

NSQ was designed and developed by Matt Reiferson (@imsnakes) and Jehiah Czebotar (@jehiah) but wouldn't have been possible without the support of bitly and all our contributors.

Logo created by Wolasi Konu (@kisalow).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].