diff --git a/connector.go b/connector.go index b5bbcba..4eb83f7 100644 --- a/connector.go +++ b/connector.go @@ -7,7 +7,7 @@ import ( "time" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" "golang.org/x/sync/errgroup" ) diff --git a/connector_test.go b/connector_test.go index c8a9e3a..672399c 100644 --- a/connector_test.go +++ b/connector_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" "github.com/stretchr/testify/assert" ) diff --git a/consumer.go b/consumer.go index f9dcae9..cfd74f3 100644 --- a/consumer.go +++ b/consumer.go @@ -2,7 +2,7 @@ package rabbitroutine import ( "context" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) // Consumer interface provides functionality of rabbit entity Declaring and queue consuming. diff --git a/consumer_example_test.go b/consumer_example_test.go index 3f5aee3..10b370a 100644 --- a/consumer_example_test.go +++ b/consumer_example_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/furdarius/rabbitroutine" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) // Consumer implement rabbitroutine.Consumer interface. diff --git a/events.go b/events.go index 6f3f96e..4378817 100644 --- a/events.go +++ b/events.go @@ -1,6 +1,6 @@ package rabbitroutine -import "github.com/streadway/amqp" +import amqp "github.com/rabbitmq/amqp091-go" // Retried is fired when connection retrying occurs. // The event will be emitted only if the connection was not established. diff --git a/examples/consume/consumer.go b/examples/consume/consumer.go index 9ecad80..482b22d 100644 --- a/examples/consume/consumer.go +++ b/examples/consume/consumer.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) // Consumer implement rabbitroutine.Consumer interface. diff --git a/examples/publish/main.go b/examples/publish/main.go index 350aa11..d7e6fea 100644 --- a/examples/publish/main.go +++ b/examples/publish/main.go @@ -7,7 +7,7 @@ import ( "time" "github.com/furdarius/rabbitroutine" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) func main() { diff --git a/go.mod b/go.mod index e18172e..223a0f0 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.15 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pkg/errors v0.9.1 - github.com/streadway/amqp v1.0.0 - github.com/stretchr/testify v1.6.1 - golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a + github.com/rabbitmq/amqp091-go v1.4.0 + github.com/stretchr/testify v1.7.0 + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c ) diff --git a/go.sum b/go.sum index 935dad2..31d3c1e 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,56 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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.4.0 h1:T2G+J9W9OY4p64Di23J6yH7tOkMocgnESvYeBjuG9cY= +github.com/rabbitmq/amqp091-go v1.4.0/go.mod h1:JsV0ofX5f1nwOGafb8L5rBItt9GyhfQfcJj+oyz0dGg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/integration_test.go b/integration_test.go index 5b7cb59..85234ad 100644 --- a/integration_test.go +++ b/integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package rabbitroutine @@ -10,7 +11,7 @@ import ( "time" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" "github.com/stretchr/testify/assert" ) diff --git a/pool.go b/pool.go index bbd3d6f..7f4d52b 100644 --- a/pool.go +++ b/pool.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) // ChannelKeeper stores AMQP Channel with Confirmation and Close chans. diff --git a/pool_test.go b/pool_test.go index bc8f5cc..62a9878 100644 --- a/pool_test.go +++ b/pool_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" "github.com/stretchr/testify/assert" ) diff --git a/publisher.go b/publisher.go index 552e67d..736a56d 100644 --- a/publisher.go +++ b/publisher.go @@ -7,7 +7,7 @@ import ( "time" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) var ( diff --git a/publisher_example_test.go b/publisher_example_test.go index 507866f..98a80e8 100644 --- a/publisher_example_test.go +++ b/publisher_example_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/furdarius/rabbitroutine" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" ) // This example demonstrates publishing messages in RabbitMQ exchange using FireForgetPublisher. diff --git a/publisher_test.go b/publisher_test.go index 3303184..225eb36 100644 --- a/publisher_test.go +++ b/publisher_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/pkg/errors" - "github.com/streadway/amqp" + amqp "github.com/rabbitmq/amqp091-go" "github.com/stretchr/testify/assert" )