ActiveMQ Transport Connectors
I. Introduction
What is the Transport Connectors of ActiveMQ?
ActiveMQ is a message server. As a message server, there will be producers and consumers to use it. The producer sends the message to ActiveMQ, and the consumer obtains the message from ActiveMQ. Therefore, both producers and consumers need to establish a connection with ActiveMQ to exchange messages.Both producers and consumers can be considered as ActiveMQ clients.
ActiveMQ provides many methods for the Client to connect to it. For example, the Client can use TCP, UDP, SSL, HTTP, and other methods to connect to ActiveMQ. These connections are: Transport Connectors.
Because TCP connection is used in the project, some knowledge about TCP Transport ctor Ctor is recorded here.
2. TCP Transport Connector
To connect, you need an address (URI). The URI format of the TCP connection is as follows:
The query part can contain many parameters. These parameters are Transport Options, which can be used to set some underlying TCP transmission behaviors, such as connection timeout and TCP connection queue size .... for more Transport Options, refer to the official website.
Because ActiveMQ supports multiple connection methods, you can see the relevant configuration in its configuration file. The configuration file is conf/activemq. xml. The following is the ActiveMQ configuration file I used:
It can be seen that the above configuration file points out that ActiveMQ supports various connection protocols: TCP, AMQP, STOMP... in fact, this does not conflict with the SSL and HTTP mentioned above. SSL and HTTP are only at the bottom layer.
For details about each protocol, refer:
Messages are transmitted between networks in the form of byte streams. Therefore, we need to serialize messages. What is the serialization method of TCP ctor in the form of TCP?
The serialization format is defined by the wire protocol. For example, openwire. For more information about the wire protocol, see the official documentation.
How messages are serialized from and to a byte-sequence is defined by the wire protocol. the TCP transport connector is used to exchange messages serialized to OpenWire wire format over the TCP network.
Recommended reading:
Spring + Log4j + ActiveMQ Remote logging-practice + Analysis
ActiveMQ practice in Spring
ActiveMQ installation in Linux
ACTIVEMQ server in Ubuntu
Error solving when ActiveMQ is started in CentOS 6.5
Spring + JMS + ActiveMQ + Tomcat Implement Message Service
Set ActiveMQ port and WEB port in Linux
ActiveMQ details: click here
ActiveMQ: click here
This article permanently updates the link address: