Skip to content

Commit

Permalink
Merge pull request #195 from lenny-intel/remove-zmq
Browse files Browse the repository at this point in the history
feat: Remove deprecated ZeroMQ implementation
  • Loading branch information
Lenny Goodell authored Nov 17, 2022
2 parents 8525880 + 1801bc4 commit b551727
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 1,483 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: test unittest lint

ARCH=$(shell uname -m)
GO=CGO_ENABLED=1 GO111MODULE=on go
GO=go

tidy:
go mod tidy
Expand All @@ -11,14 +11,11 @@ TAGS=include_nats_messaging
unittest:
$(GO) test -tags=$(TAGS) -race ./... -coverprofile=coverage.out ./...

test-no-zmq:
$(GO) test -tags no-zmq -race ./... -coverprofile=coverage.out ./...

lint:
@which golangci-lint >/dev/null || echo "WARNING: go linter not installed. To install, run\n curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b \$$(go env GOPATH)/bin v1.46.2"
@if [ "z${ARCH}" = "zx86_64" ] && which golangci-lint >/dev/null ; then golangci-lint run --config .golangci.yml ; else echo "WARNING: Linting skipped (not on x86_64 or linter not installed)"; fi

test: unittest test-no-zmq lint
test: unittest lint
$(GO) vet ./...
gofmt -l $$(find . -type f -name '*.go'| grep -v "/vendor/")
[ "`gofmt -l $$(find . -type f -name '*.go'| grep -v "/vendor/")`" = "" ]
Expand Down
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,16 @@ These interface functions connect, publish, subscribe and disconnect to/from the

### How to Use ###

This library is used by Go programs for interacting with the Message Bus (i.e. zeroMQ). If you are using zeroMQ as your message bus be sure to first [install the zeroMQ library](https://github.com/edgexfoundry/edgex-go#zeromq).
This library is used by Go programs for interacting with the Message Bus (i.e. redis).

The Message Bus connection information as well as which implementation to use is stored in the service's toml configuration as:

Publisher:
```toml
[MessageQueue]
Protocol = "tcp"
Host = "*"
Port = 5563
Type = "zero"
Topic = "events"
```

Subscriber:
```toml
[MessageQueue]
Protocol = "tcp"
Protocol = "redis"
Host = "localhost"
Port = 5563
Type = "zero"
Topic = "events"
Port = 6379
Type = "redis"
```

#### MQTT Configuration
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/google/uuid v1.3.0
github.com/nats-io/nats-server/v2 v2.9.3
github.com/nats-io/nats.go v1.18.0
github.com/pebbe/zmq4 v1.2.7
github.com/stretchr/testify v1.8.0
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pebbe/zmq4 v1.2.7 h1:6EaX83hdFSRUEhgzSW1E/SPoTS3JeYZgYkBvwdcrA9A=
github.com/pebbe/zmq4 v1.2.7/go.mod h1:nqnPueOapVhE2wItZ0uOErngczsJdLOGkebMxaO8r48=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
268 changes: 0 additions & 268 deletions internal/pkg/zeromq/client.go

This file was deleted.

Loading

0 comments on commit b551727

Please sign in to comment.