diff --git a/bin/README.md b/bin/README.md index 6c31b9d2..01e52876 100644 --- a/bin/README.md +++ b/bin/README.md @@ -2,7 +2,7 @@ This directory contains binaries to run services used in unit and integration tests. The [test script](../test.sh) controls the starting and stopping of these services. -* NSQ version is 1.2.0 +* NSQ version is 1.3.0 * Redis version is 5.0.7 The NSQ binaries were downloaded from their respective download pages. Redis was built from scratch on OSX Catalina 10.15.2 and on Ubuntu 14.04.6 LTS (GNU/Linux 4.4.0-148-generic x86_64) with gcc version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4. diff --git a/bin/linux/nsqadmin b/bin/linux/nsqadmin index 734a627c..5871bae3 100755 Binary files a/bin/linux/nsqadmin and b/bin/linux/nsqadmin differ diff --git a/bin/linux/nsqadmin-12 b/bin/linux/nsqadmin-12 new file mode 100755 index 00000000..734a627c Binary files /dev/null and b/bin/linux/nsqadmin-12 differ diff --git a/bin/linux/nsqd b/bin/linux/nsqd index 245bcbed..f9a3e5f3 100755 Binary files a/bin/linux/nsqd and b/bin/linux/nsqd differ diff --git a/bin/linux/nsqd-12 b/bin/linux/nsqd-12 new file mode 100755 index 00000000..245bcbed Binary files /dev/null and b/bin/linux/nsqd-12 differ diff --git a/bin/linux/nsqlookupd b/bin/linux/nsqlookupd index 33fac119..14e2e18e 100755 Binary files a/bin/linux/nsqlookupd and b/bin/linux/nsqlookupd differ diff --git a/bin/linux/nsqlookupd-12 b/bin/linux/nsqlookupd-12 new file mode 100755 index 00000000..33fac119 Binary files /dev/null and b/bin/linux/nsqlookupd-12 differ diff --git a/bin/osx/amd64/nsqadmin b/bin/osx/amd64/nsqadmin index f9a1c545..5871bae3 100755 Binary files a/bin/osx/amd64/nsqadmin and b/bin/osx/amd64/nsqadmin differ diff --git a/bin/osx/amd64/nsqadmin-12 b/bin/osx/amd64/nsqadmin-12 new file mode 100755 index 00000000..f9a1c545 Binary files /dev/null and b/bin/osx/amd64/nsqadmin-12 differ diff --git a/bin/osx/amd64/nsqd b/bin/osx/amd64/nsqd index eb5a1eef..f9a3e5f3 100755 Binary files a/bin/osx/amd64/nsqd and b/bin/osx/amd64/nsqd differ diff --git a/bin/osx/amd64/nsqd-12 b/bin/osx/amd64/nsqd-12 new file mode 100755 index 00000000..eb5a1eef Binary files /dev/null and b/bin/osx/amd64/nsqd-12 differ diff --git a/bin/osx/amd64/nsqlookupd b/bin/osx/amd64/nsqlookupd index 734345d7..14e2e18e 100755 Binary files a/bin/osx/amd64/nsqlookupd and b/bin/osx/amd64/nsqlookupd differ diff --git a/bin/osx/amd64/nsqlookupd-12 b/bin/osx/amd64/nsqlookupd-12 new file mode 100755 index 00000000..734345d7 Binary files /dev/null and b/bin/osx/amd64/nsqlookupd-12 differ diff --git a/bin/osx/arm64/nsqadmin b/bin/osx/arm64/nsqadmin index dae392a1..e16bb5d5 100755 Binary files a/bin/osx/arm64/nsqadmin and b/bin/osx/arm64/nsqadmin differ diff --git a/bin/osx/arm64/nsqadmin-12 b/bin/osx/arm64/nsqadmin-12 new file mode 100755 index 00000000..dae392a1 Binary files /dev/null and b/bin/osx/arm64/nsqadmin-12 differ diff --git a/bin/osx/arm64/nsqd b/bin/osx/arm64/nsqd index cd913cce..58ede728 100755 Binary files a/bin/osx/arm64/nsqd and b/bin/osx/arm64/nsqd differ diff --git a/bin/osx/arm64/nsqd-12 b/bin/osx/arm64/nsqd-12 new file mode 100755 index 00000000..cd913cce Binary files /dev/null and b/bin/osx/arm64/nsqd-12 differ diff --git a/bin/osx/arm64/nsqlookupd b/bin/osx/arm64/nsqlookupd index 56f18a8f..33dddd34 100755 Binary files a/bin/osx/arm64/nsqlookupd and b/bin/osx/arm64/nsqlookupd differ diff --git a/bin/osx/arm64/nsqlookupd-12 b/bin/osx/arm64/nsqlookupd-12 new file mode 100755 index 00000000..56f18a8f Binary files /dev/null and b/bin/osx/arm64/nsqlookupd-12 differ diff --git a/go.mod b/go.mod index 5fdb258f..38d91f35 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/google/uuid v1.2.0 github.com/gorilla/securecookie v1.1.1 github.com/jinzhu/copier v0.3.0 - github.com/nsqio/nsq v1.2.0 + github.com/nsqio/nsq v1.3.0 github.com/nyaruka/phonenumbers v1.2.2 github.com/rs/zerolog v1.20.0 github.com/spf13/viper v1.7.1 @@ -45,7 +45,8 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/gojektech/heimdall v5.0.2+incompatible // indirect github.com/gojektech/valkyrie v0.0.0-20190210220504-8f62c1e7ba45 // indirect - github.com/golang/snappy v0.0.3 // indirect + github.com/golang/protobuf v1.5.0 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -53,7 +54,7 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/julienschmidt/httprouter v1.2.0 // indirect + github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/klauspost/compress v1.15.0 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/leodido/go-urn v1.2.4 // indirect @@ -63,8 +64,8 @@ require ( github.com/mitchellh/mapstructure v1.1.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/nsqio/go-diskqueue v0.0.0-20180306152900-74cfbc9de839 // indirect - github.com/nsqio/go-nsq v1.0.7 // indirect + github.com/nsqio/go-diskqueue v1.1.0 // indirect + github.com/nsqio/go-nsq v1.1.0 // indirect github.com/pelletier/go-toml v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pkg/errors v0.8.1 // indirect diff --git a/go.sum b/go.sum index 6e98c1c2..b9ab7545 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,7 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= @@ -121,8 +122,11 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -192,6 +196,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/judwhite/go-svc v1.0.0/go.mod h1:EeMSAFO3mLgEQfcvnZ50JDG0O1uQlagpAbMS6talrXE= github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= @@ -242,10 +248,16 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsqio/go-diskqueue v0.0.0-20180306152900-74cfbc9de839 h1:nZ0z0haJRzCXAWH9Jl+BUnfD2n2MCSbGRSl8VBX+zR0= github.com/nsqio/go-diskqueue v0.0.0-20180306152900-74cfbc9de839/go.mod h1:AYinRDfdKMmVKTPI8wOcLgjcw2pTS3jo8fib1VxOzsE= +github.com/nsqio/go-diskqueue v1.1.0 h1:r0dJ0DMXT3+2mOq+79cvCjnhoBxyGC2S9O+OjQrpe4Q= +github.com/nsqio/go-diskqueue v1.1.0/go.mod h1:INuJIxl4ayUsyoNtHL5+9MFPDfSZ0zY93hNY6vhBRsI= github.com/nsqio/go-nsq v1.0.7 h1:O0pIZJYTf+x7cZBA0UMY8WxFG79lYTURmWzAAh48ljY= github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito= +github.com/nsqio/go-nsq v1.1.0 h1:PQg+xxiUjA7V+TLdXw7nVrJ5Jbl3sN86EhGCQj4+FYE= +github.com/nsqio/go-nsq v1.1.0/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY= github.com/nsqio/nsq v1.2.0 h1:inbQG4LAl8PpMMZAUi0FhLvjQ+57wOfPzWczVFdng7Q= github.com/nsqio/nsq v1.2.0/go.mod h1:hrx5K/ukZ1mebJBTNpv6og98a7I5zR279qjYNPdgdL0= +github.com/nsqio/nsq v1.3.0 h1:v7NtyO844ieTIOCQEqQ7IUSSi1ImhgrTTto1rgIYGEU= +github.com/nsqio/nsq v1.3.0/go.mod h1:RxNr6UC0kSkNF44LnJrlN3U3CQnQGTXk+QKfSZLzqvc= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nyaruka/phonenumbers v1.2.2 h1:OwVjf7Y4uHoK9VJUrA8ebR0ha2yc6sEYbfrwkq0asCY= diff --git a/network/nsq_client.go b/network/nsq_client.go index 95d03c04..7e8bd926 100644 --- a/network/nsq_client.go +++ b/network/nsq_client.go @@ -8,6 +8,7 @@ import ( "net/http" "net/url" "strconv" + "strings" "github.com/nsqio/nsq/nsqd" "github.com/rs/zerolog" @@ -63,7 +64,7 @@ func (data *NSQStatsData) ClientIsRunning(hostname string) bool { for _, topic := range data.Topics { for _, channel := range topic.Channels { for _, client := range channel.Clients { - if client.Hostname == hostname { + if strings.Contains(client.String(), hostname) { return true } }