diff --git a/app_test.go b/app_test.go
index <HASH>..<HASH> 100644
--- a/app_test.go
+++ b/app_test.go
@@ -111,8 +111,8 @@ var _ = Describe("Companies", func() {
 			cfg2 := &gogadgets.Config{
 				Master:  false,
 				Host:    "localhost",
-				SubPort: port + 1,
-				PubPort: port,
+				SubPort: port,
+				PubPort: port + 1,
 			}
 
 			a := gogadgets.NewApp(cfg)
diff --git a/zmq.go b/zmq.go
index <HASH>..<HASH> 100644
--- a/zmq.go
+++ b/zmq.go
@@ -67,8 +67,8 @@ func NewClientSockets(cfg SocketsConfig) (*Sockets, error) {
 		master:  false,
 		id:      newUUID(),
 		host:    cfg.Host,
-		subPort: cfg.PubPort,
-		pubPort: cfg.SubPort,
+		subPort: cfg.SubPort,
+		pubPort: cfg.PubPort,
 	}
 	return s, nil
 }
trying to get zmq ports right