Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from streadway to official amqp091 go module #32

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/klauspost/compress v1.15.2
github.com/orcaman/concurrent-map v1.0.0
github.com/streadway/amqp v1.0.0
github.com/rabbitmq/amqp091-go v1.3.4
github.com/stretchr/testify v1.7.1
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f
)
Expand Down
4 changes: 2 additions & 2 deletions v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CF
github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo=
github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/rabbitmq/amqp091-go v1.3.4 h1:tXuIslN1nhDqs2t6Jrz3BAoqvt4qIZzxvdbdcxWtHYU=
github.com/rabbitmq/amqp091-go v1.3.4/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/channelhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"sync"

"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// ChannelHost is an internal representation of amqp.Channel.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/connectionhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// ConnectionHost is an internal representation of amqp.Connection.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/connectionpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/Workiva/go-datastructures/queue"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// ConnectionPool houses the pool of RabbitMQ connections.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// Consumer receives messages from a RabbitMQ location.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/letter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tcr

import (
"github.com/google/uuid"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// Letter contains the message body and address of where things are going.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/letters.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/google/uuid"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

var mockRandomSource = rand.NewSource(time.Now().UnixNano())
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/google/uuid"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// PublishReceipt is a way to monitor publishing success and to initiate a retry when using async publishing.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// Publisher contains everything you need to publish a message.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/rabbitservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/google/uuid"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

// RabbitService is the struct for containing all you need for RabbitMQ access.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/tcr/topologer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tcr
import (
"errors"

"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions v2/pkg/tcr/topology.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package tcr

import "github.com/streadway/amqp"
import amqp "github.com/rabbitmq/amqp091-go"

// Exchange allows for you to create Exchange topology.
type Exchange struct {
Expand All @@ -22,7 +22,7 @@ type Queue struct {
AutoDelete bool `json:"AutoDelete" yaml:"AutoDelete"`
Exclusive bool `json:"Exclusive" yaml:"Exclusive"`
NoWait bool `json:"NoWait" yaml:"NoWait"`
Type string `json:"Type" yaml:"Type"` // classic or quorum, type of quorum disregards exclusive and enables durable properties when building from config
Type string `json:"Type" yaml:"Type"` // classic or quorum, type of quorum disregards exclusive and enables durable properties when building from config
Args amqp.Table `json:"Args,omitempty" yaml:"Args,omitempty"` // map[string]interface()
}

Expand Down
2 changes: 1 addition & 1 deletion v2/tests/main_publisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/fortytw2/leaktest"
"github.com/houseofcat/turbocookedrabbit/v2/pkg/tcr"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion v2/tests/main_scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/fortytw2/leaktest"
"github.com/houseofcat/turbocookedrabbit/v2/pkg/tcr"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion v2/tests/main_topo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/houseofcat/turbocookedrabbit/v2/pkg/tcr"
"github.com/streadway/amqp"
amqp "github.com/rabbitmq/amqp091-go"
"github.com/stretchr/testify/assert"
)

Expand Down