Overall structure of RabbitMQ

RabbitMQ is an open source message broker middleware created in 2007 and that is now managed by GoPivotal.

Most of the operations are performed in memory. RabbitMQ is not “disk-oriented”:
messages are received by brokers via an exchange (i.e. a logical entry point that will decide based on some criteria in which queue(s) the broker should place a message) and then pushed to the registered consumers. The broker pushes randomly queued messages toward the consumers. They thus receive unordered messages, and do not need to remember anything about the queue state (as messages are unordered and pushed by the brokers. They do not and cannot fetch specific messages on their own). Messages are paged out to disc only if there is no more memory available, or if they are explicitly told to be stored.

Continue reading “Overall structure of RabbitMQ”

Hadoop error: log4j:WARN No appenders could be found for logger

log4j need a configure file to tell it how to work.

Continue reading “Hadoop error: log4j:WARN No appenders could be found for logger”

Leetcode 210. Course Schedule II

210. Course Schedule II

Description

There are a total of n courses you have to take, labeled from 0 to n - 1.

Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]

Continue reading “Leetcode 210. Course Schedule II”

Reproduce:WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for ‘jquery’. Please add a ScriptResourceMapping named jquery(case-sensitive)

This problem occurs while using control RangeValidation. And the answer I can use is following.

In webconfig and search for:

Delete <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />

Continue reading “Reproduce:WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for ‘jquery’. Please add a ScriptResourceMapping named jquery(case-sensitive)”

solving unittest bug of csrf_token in Django

in the Chapter 5 of Book “Test-Driven Web Development with Python” written by Harry J.W. Percival, there is a bug in the part of unit test.

while high version of Django(>1.7) rendering template, it will replace the template tag with a <input type="hidden">, the value is csrf_token.
Continue reading “solving unittest bug of csrf_token in Django”