Skip to content
Open
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
9 changes: 5 additions & 4 deletions lib/clients/adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ defmodule ExRabbitPool.Clients.Adapter do
{:ok, String.t()} | AMQP.Basic.error()
@callback cancel_consume(AMQP.Channel.t(), String.t(), keyword) ::
{:ok, String.t()} | {:error, AMQP.Basic.error()}
@callback ack(AMQP.Channel.t(), String.t(), keyword()) :: :ok | AMQP.Basic.error()
@callback reject(AMQP.Channel.t(), String.t(), keyword()) :: :ok | AMQP.Basic.error()
@callback ack(AMQP.Channel.t(), AMQP.Basic.delivery_tag(), keyword()) ::
:ok | AMQP.Basic.error()
@callback reject(AMQP.Channel.t(), AMQP.Basic.delivery_tag(), keyword()) ::
:ok | AMQP.Basic.error()
@callback declare_queue(AMQP.Channel.t(), AMQP.Basic.queue(), keyword()) ::
{:ok, map()} | AMQP.Basic.error()
@callback queue_bind(AMQP.Channel.t(), AMQP.Basic.queue(), AMQP.Basic.exchange(), keyword()) ::
:ok | AMQP.Basic.error()
@callback declare_exchange(AMQP.Channel.t(), AMQP.Basic.exchange(), keyword()) ::
:ok | AMQP.Basic.error()
@callback qos(AMQP.Channel.t(), keyword()) ::
:ok | AMQP.Basic.error()
@callback qos(AMQP.Channel.t(), keyword()) :: :ok | AMQP.Basic.error()
end
4 changes: 2 additions & 2 deletions lib/clients/fake_rabbitmq.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ defmodule ExRabbitPool.FakeRabbitMQ do
end

@impl true
def ack(_channel, _tag, _options \\ []) do
def ack(_channel, _delivery_tag, _options \\ []) do
:ok
end

@impl true
def reject(_channel, _tag, _options \\ []) do
def reject(_channel, _delivery_tag, _options \\ []) do
:ok
end

Expand Down
8 changes: 4 additions & 4 deletions lib/clients/rabbitmq.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ defmodule ExRabbitPool.RabbitMQ do
end

@impl true
def ack(%Channel{} = channel, tag, options \\ []) do
Basic.ack(channel, tag, options)
def ack(%Channel{} = channel, delivery_tag, options \\ []) do
Basic.ack(channel, delivery_tag, options)
end

@impl true
def reject(%Channel{} = channel, tag, options \\ []) do
Basic.reject(channel, tag, options)
def reject(%Channel{} = channel, delivery_tag, options \\ []) do
Basic.reject(channel, delivery_tag, options)
end

@impl true
Expand Down
6 changes: 0 additions & 6 deletions lib/consumer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ defmodule ExRabbitPool.Consumer do

{:stop, reason} ->
{:stop, reason, state}

_ ->
{:noreply, state}
end
end

Expand All @@ -133,9 +130,6 @@ defmodule ExRabbitPool.Consumer do

{:stop, reason} ->
{:stop, reason, state}

_ ->
{:noreply, state}
end
end

Expand Down