This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move queue utilities to a dedicated module (#124)
This functionality might also have value for consumers and other use cases, so let's not lock it for publishers only.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule GenRMQ.Queue do | ||
@moduledoc """ | ||
This module defines utility functions for queues | ||
""" | ||
|
||
defdelegate consumer_count(channel, queue), to: AMQP.Queue | ||
defdelegate empty?(channel, queue), to: AMQP.Queue | ||
defdelegate message_count(channel, queue), to: AMQP.Queue | ||
defdelegate purge(channel, queue), to: AMQP.Queue | ||
defdelegate status(channel, queue), to: AMQP.Queue | ||
end |