Skip to content

htdat148/erlangRabbitMQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This repo using rebar3 for managing Erlang applications. Assume that you already had erlang OTP and rebar3 in your machine

Installation

Clone the repo and start the application

git clone https://github.com/htdat148/erlangRabbitMQ.git
cd erlangRabbitMQ
rebar3 shell

Default configuration

Be default, the rabbit application will create 3 exchanges corresponding to 3 type: direct, fanout and topic. Each exchange is a running process supervise by rabbit_sup.erl. The exchange types and name are get from config/sys.config

For example with "direct" exchange: [{name, <<"direct">>}, {type, <<"direct">>}, {process, "direct_exchange_handler"}]

Usage

Add a queue to exchange. A child process will be spawned and manage by exchange process

rabbit_client_api:add_queue_to_exchange(Exchange, Queue).

Bind routing keys to queue

rabbit_client_api:bind_routing_key_to_queue(RoutingKeys, Queue).

Unbind routing keys to queue

rabbit_client_api:unbind_routing_key_to_queue(RoutingKeys, Queue).

Publish/Sending a message

rabbit_client_api:send_msg(ExchangeStr, RoutingKeyStrs, MsgStr).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages