Tags: Bubuko org unix virtual username Miss TST Use uploadInstall Erlang and RABBITMQ on Linux under Installation Erlang
Download Erlang installation packageHttp://erlang.org/download/otp_src_20.3.tar.gz
Upload to the server TMP directory and go to the TMP directory for installation.# cd/tmp# mkdir-p/usr/l
For the installation of RABBITMQ, I also really wasted some effort, version download a lot, but there are compile problems, compile does not pass, error can not find the cause of errors, even error is * * * such existence.Other dependencies that I have not tested because I exist in the environment: Python,simplejson, installingBetween RABBITMQ is dependent on the Erlang
The Erlang version of the company development and test environment is 19.0.3,RABBITMQ version 3.6.10. Stable use for nearly a year under the cluster condition, no problem.In order to remain consistent with the line, the online production environment uses the same version, and after several months of operation the problem occurs. The phenomenon is as follows:In a few days, there were three queues with no con
Erlang: RabbitMQ source code analysis 3. In-depth analysis of supervisor and supervisor2, supervisor
Supervisor is also a common behavior in Erlang/OTP. It is used to build a supervisor tree for process monitoring and fault recovery.
RabbitMQ implements a supervisor2. We analyze the implementation and differences betwe
writebuffer of handle must be prim_file: Write
3. Call prim_file: Read to obtain the result.
Append:
1. Like read, it is also possible to reopen.
2. If the client does not set writebuffer during open, it will directly call prim_file: Write (HDL, data ).
3. the so-called writebuff is for a single handle, that is, to create an empty list for buffer during open, and to call prim_file if buffersize> limit set during client open at append: write writes all the buffer into the file. If buffersize
above, and we will send a message to the direct type of exchange instead of the Fanout type. We will provide the severity of the log as routing key. The application that receives the message will be able to select the message for the severity it wants to receive. Let's focus first on sending logs.First, we need to create a echange:Amqp_channel:call (channel, # ' Exchange.declare ' {exchange = In addition, we are ready to send a message:Amqp_channel:cast (channel, # ' Basic.publish ' {exchange =
As mentioned before, in a cluster environment, only metadata in the queue is synchronized on all nodes in the cluster, but data in the queue only exists on one node. This is disappointing: if the data is not redundant, it is easy to lose data or even durable, if the node where the data is located is lost, it will wait for the node to be restored. is there a message redundancy solution? Yes, rabbitmq has been supporting the mirror Queue (mirrored Queue
Two stenography strokes, some breaking changes in rabbitmq 3.0.
Mirror queue policiesDo you still remember how to create an image queue before? In the new version of X-ha-policy [LINK], using this parameter will not report an error, but the image will no longer take effect. the alternative solution is to use policies. the reason for this change is: the status of the image queue cannot be determined during running. The new solution is to configure the
Rabbitmq topic exchange routes messages according to rules. Note that the topic expression used here is not a regular expression. In the Getting Started tutorial [click the link], we briefly describe how to write rules:
* (STAR) can substitute for exactly one word.
# (Hash) can substitute for zero or more words.
The above statement is easy to misunderstand. I will try to explain it:
. Used to divide the routing key into several parts)
* Mat
with a working assumption that the routing keys of logs would have both words: "".emit_log_topic.erl -module (emit_log_topic).-compile ([Export_all]).-include_lib ("Amqp_client/include/amqp_client.hrl"). Main (ARGV) ->{ok,Connection}= amqp_connection:start (#amqp_params_network {host= "localhost"}), {ok, channel}=amqp_connection:open_channel (Connection), amqp_channel:call ( channel,# ' Exchange.declare ' {exchange= Receiver_logs_topic.erl -module (receive_logs_topic).-compile ([Export_all]).
tolerance. And then, in December 1998, Ericsson decided to release Erlang as an open source code. In January 1991, the official Erlang programming language Web site was about 36k, 10 years later, reaching 2800k. It seems that the Erlang community is growing (but this development speed, eh ... Or too worried about Mulberry).Application ScenariosAlthough many prog
Set up a RabbitMq cluster and a rabbitmq Cluster
Lab environment:
The operating system is Centos 7.2.
IP hostName
192.168.190.132 node132
192.168.190.139 node139
192.168.190.140 node140
RabbitMQ Port
4369 (epmd)
5672,567 1 (AMQP 0-9-1 and 1.0 without and with TLS)
25672. this port used by Erlang distribution for
RABBITMQ Installation:
1. RABBITMQ is based on Erlang, so you must first configure the Erlang environment. Install Erlang
Go to Erlang's website: http://www.erlang.org for downloadThere are two ways of installing:
1.1. Source Installation Method:
mkdir
RabbitMQ Article 1: setup and configuration of rabbitMQ and rabbitmq Article 1
Install rabbitMQ in WindowsStep 1: Install software
If rabbitMQ is installed, first install OTP software based on the erlang language, and then downloa
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.