Questions on Message Orientated Middleware and ActiveMQ terminology 关于消息定向中间件和ActiveMQ术语的问题。 Store and Forward存储和转发brokers receive messages, store them locally and forwards the message to a recipient (in this case another broker) when it is able to do so. The message is only deleted once its been sucessfully delivered. 代理接收消息,将消息存储在本地,并将消息发送给接收方(在本例中是另一个代理),当它能够这样做时。消息一旦成功发送,就会被删除。 Reliable messaging可靠的消息传递Best efforts are made to deliver a message whilst the system (broker/cluster/network) is running. 当系统(代理/集群/网络)运行时,最好的工作是传递消息。 Guaranteed保证No matter what happens to the physical network connections or the destination service the message will be delivered to the receiptant - provided there is no catastraphic loss to the persistent data store of a broker along the message(s) route. This means a message could be lost if there was a catastrophic failure to a broker's activemq data disk. 无论物理网络连接或目标服务发生了什么,消息都将传递给接收者——前提是在消息(s)路由上的代理的持久数据存储中没有catastraphic丢失。这意味着如果代理的activemq数据磁盘出现灾难性故障,则消息可能丢失。 Fault Tolerance容错Unexpected failures never lead to lost or corrupted data - for a messaging system - there are additional caveats for corrupted data - message ordering and once and only once message delivery. 意想不到的故障永远不会导致丢失或损坏的数据——对于消息传递系统而言——对于已损坏的数据——消息排序和一次且仅一次消息传递,还有附加的警告。 Network Orphan网络孤儿A broker can become isolated from other brokers in the cluster due to an network outage. The broker and it's connected clients may not be able to detect if the loss of other brokers in the cluster is due to the broker(or their machines) or simply a router/cable problem. This is a big issue for clustering, as it has the potential to create corrupted data exchanges when the network is re-established. 由于网络中断,代理可以与集群中的其他代理隔离。代理和它的连接客户端可能无法检测集群中其他代理的丢失是由于代理(或他们的机器)或仅仅是一个路由器/电缆问题。这对于集群来说是一个大问题,因为它有可能在重新建立网络时创建损坏的数据交换。 Clustering聚类multiple brokers are used to provide a single logical service. 多个代理用于提供单个逻辑服务。使用集群有三个原因: Increased capacity增加容量This is load balancing - this is currently achived by networking brokers together - this won't change in ActiveMQ 4.0 (see below). 这是负载均衡——这是目前由网络经纪人共同完成的——这不会在ActiveMQ 4.0中发生变化(见下文)。 Geographical Distribution地理分布Again this is achived in ActiveMQ by broker networks. 这是通过代理网络实现的ActiveMQ。 High Availability高可用性The guarenteed maximum amount of downtime that will not be exceeded: 不超过的停机时间上限:
Architecture basics建筑基础知识Clusters can be either based around shared storage (shared database or disk) or shared nothing (every broker has their own private storage). There is also two basic mechanisms used for message integrity for failure scenarios: 集群可以基于共享存储(共享数据库或磁盘),也可以不共享任何东西(每个代理都有自己的私有存储)。还有两种基本机制用于失败场景的消息完整性: Master/Slave主/从A broker has a standby replacement - another broker that is kept in step by the cluster that will take over in the event of a broker failure. 一个代理有一个备用的替换——另一个代理,它是由在代理失败时接管的集群所控制的。 Synchronous同步Every broker is kept exactly in-step with message exchanges across the entire cluster. This is the most secure for failure scenrios, but suffers from performance problems because it the responsibility of the cluster to ensure that messages are fully replicated across every node. This results in higher latency and increased traffic. In practice, it is unsual to have more than 2 brokers in such a cluster, because the performance degradation is directly related to the number of brokers in the cluster. 每个代理都与整个集群中的消息交换保持同步。对于故障场景来说,这是最安全的,但是它会遇到性能问题,因为集群的职责是确保消息在每个节点上完全复制。这将导致更高的延迟和增加的流量。在实践中,在这样的集群中有两个以上的代理是不可行的,因为性能下降直接关系到集群中代理的数量。 Hybrid混合动力A fully synchronous cluster, but it is the responsibility of the client (not the brokers) to ensure every broker is kept up to date. This has advantages for performance, but is complicated by the additional exchange between client and broker(s) to ensure that only one broker does the message dispatching for a client. 一个完全同步的集群,但客户(而不是代理)的责任是确保每个代理都保持最新。这对性能有好处,但由于客户端和代理之间的额外交换而变得复杂,以确保只有一个代理为客户机执行消息分派。 |