24.12.11

ActiveMQ in Action–Chapter 4 - Connector URI/URI Protocols

Apache ActiveMQ ™ -- URI Protocols

  • Low-level connectors: ActiveMQ connectors using this kind of simple hierarchical URI pattern are sometimes referred to as low-level connectors and are used to implement basic network communication protocols.
    • I tried to search “low-level connectors” via Google but rarely find anything.
  • Composite URIs and automatic reconnection:
    • Apache ActiveMQ ™ -- Failover Transport Reference
      • This is the dedicated page for failover:// scheme.
      • The Failover transport layers reconnect logic on top of any of the other transports. (We used to call this transport the Reliable transport in ActiveMQ 3).
      • The Failover configuration syntax allows you to specify any number of composite uris. The Failover transport randomly chooses one of the composite URI and attempts to establish a connection to it. If it does not succeed or if it subsequently fails, a new connection is established to one of the other uris in the list.
    • But what “Understanding connector URIs” says about “failover transport” is about composite URIs using static:// scheme.
      • Apache ActiveMQ ™ -- Static Transport Reference
      • The static transport provides a hard coded mechanism to discover other connections using a list of URIs. A connection using this discovery mechanism will attempt to connect to all URIs in the list until it is successful.
      • As the static transport protocol is for broker discovery, it should not be used by client programs. Clients wishing to failover to a static list of broker instances, should use the failover:// transport instead.
  • White spaces:
    • Apache ActiveMQ ™ -- Configuring Transports
    • Be careful about whitespace
      All of the following URI configurations are based on the java.net.URI class which does not allow whitespace to be used. So if you are using failover: or static: URIs, do not put any whitespace around the , symbol.

No comments: