Created
November 4, 2009 21:54
-
-
Save kevsmith/226417 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| %% @doc Connect to a RabbitMQ server and open a channel | |
| %% @spec login(vhost(), username(), password()) -> {ok, connection(), channel()} | |
| login(VHost, UserName, Password) -> | |
| cheshire_connect:login(VHost, UserName, Password). | |
| %% @doc Disconnect from a RabbitMQ server and open a channel | |
| %% @spec logout(connection(), channel()) -> ok | {error, any()} | |
| logout(Connection, Channel) | |
| %% @doc Creates a randomly named queue and binds it to the | |
| %% specified exchange | |
| %% @spec bind_to(channel(), binary()) -> {ok, queuename()} | {error, any()} | |
| bind_to(Channel, ExchangeName) | |
| %% @doc Send a message via basic.publish | |
| %% @spec publish(channel(), binary(), binary()) -> ok | {error, any()} | |
| publish(Channel, ExchangeName, Payload) | |
| %% @doc Listen for single message | |
| %% @spec consume_one(channel(), binary()) -> any() | |
| consume_one(Channel, QueueName) | |
| %% @doc Listen for single message with timeout | |
| %% @spec consume_one(channel(), binary(), integer()) -> any() | {error, timeout} | |
| consume_one(Channel, QueueName, Timeout) | |
| %% @doc Register a process as a consumer for a given queue | |
| %% @spec register_consumer(channel(), binary()) -> {ok, binary()}, {error, any()} | |
| register_consumer(Channel, QueueName) | |
| %% @doc Unregister a consumer for a given queue | |
| %% @spec cancel_consumer(channel(), binary()) -> ok | {error, any()} | |
| cancel_consumer(Channel, ConsumerTag) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment