K8S如何部署ActiveMQ(单机、集群)

3.png

前言

大家好,在今天的讨论中,我们将深入研究如何将ActiveMQ迁移到云端,以便更好地利用Kubernetes的容器调度和资源管理能力,确保ActiveMQ的高可用性和可扩展性。

ActiveMQ是Apache开源组织推出的一款开源的、完全支持JMS1.1和J2EE1.4规范的JMS Provider实现的消息中间件(MOM)。它是所有开源项目中最流行也最强大的开源消息中间件,主要用于分布式系统架构中,可以实现高可用、高性能、可伸缩、易用和安全的企业级面向消息服务的系统。

ActiveMQ的核心概念主要包括以下几个方面:

  • 消息:消息是ActiveMQ中最基本的单位,它包含了实际需要传输的数据。
  • 主题(Topic):主题是一种广播类型的消息模式,一个生产者向一个主题发送消息,而所有的消费者都可以接收到这个消息。这种方式非常适合于需要将一条消息分发到多个消费者的场景。
  • 队列(Queue):队列是一种点对点的消息模式,一个生产者向一个队列发送消息,只有一个消费者能接收到这个消息。这种方式非常适合于需要将一条消息发送给一个特定的消费者的场景。
  • 消费者(Consumer):消费者是从队列或主题中获取并处理消息的应用程序。
  • 生产者(Producer):生产者是创建并向队列或主题发送消息的应用程序。
  • 消息代理(Broker):消息代理是ActiveMQ的核心组件,它负责接收、存储和转发消息。在ActiveMQ中,每一个运行的实例都是一个消息代理。
  • JMS(Java Message Service):Java消息服务是关于面向消息中间件的API,用于在两个应用程序之间或者分布式系统中发送消息,进行异步通信。JMS与具体的平台无关,绝大多数MOM(Message Oriented Middleware)提供商都对JMS提供了支持,例如ActiveMQ就是其中一个实现。

一、部署单机ActiveMQ

步骤一:创建ConfigMap

首先,我们需要创建ConfigMap,用来存储和管理ActiveMQ的相关配置。

apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-singlenamespace: 你实际的namespace
data:activemq.xml: |<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- Allows us to use system properties as variables in this configuration file --><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><value>file:${activemq.conf}/credentials.properties</value></property></bean><!-- Allows accessing the server log --><bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"lazy-init="false" scope="singleton"init-method="start" destroy-method="stop"></bean><!--The <broker> element is used to configure the ActiveMQ broker.--><broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq-single" dataDirectory="${activemq.data}">	<plugins><simpleAuthenticationPlugin><users><authenticationUser username="my_mq_test" password="my_mq_test" groups="users,admins"/></users></simpleAuthenticationPlugin></plugins><destinationPolicy><policyMap><policyEntries><policyEntry topic=">" ><!-- The constantPendingMessageLimitStrategy is used to preventslow topic consumers to block producers and affect other consumersby limiting the number of messages that are retainedFor more information, see:http://activemq.apache.org/slow-consumer-handling.html--><pendingMessageLimitStrategy><constantPendingMessageLimitStrategy limit="1000"/></pendingMessageLimitStrategy></policyEntry></policyEntries></policyMap></destinationPolicy><!--The managementContext is used to configure how ActiveMQ is exposed inJMX. By default, ActiveMQ uses the MBean server that is started bythe JVM. For more information, see:http://activemq.apache.org/jmx.html--><managementContext><managementContext createConnector="false"/></managementContext><!--Configure message persistence for the broker. The default persistencemechanism is the KahaDB store (identified by the kahaDB tag).For more information, see:http://activemq.apache.org/persistence.html--><persistenceAdapter><kahaDB directory="${activemq.data}/kahadb"/></persistenceAdapter><!--The systemUsage controls the maximum amount of space the broker willuse before disabling caching and/or slowing down producers. For more information, see:http://activemq.apache.org/producer-flow-control.html--><systemUsage><systemUsage><memoryUsage><memoryUsage percentOfJvmHeap="70" /></memoryUsage><storeUsage><storeUsage limit="100 gb"/></storeUsage><tempUsage><tempUsage limit="50 gb"/></tempUsage></systemUsage></systemUsage><!--The transport connectors expose ActiveMQ over a given protocol toclients and other brokers. For more information, see:http://activemq.apache.org/configuring-transports.html--><transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name="openwire" uri="tcp://0.0.0.0:30226?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="amqp" uri="amqp://0.0.0.0:30227?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="stomp" uri="stomp://0.0.0.0:30228?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="mqtt" uri="mqtt://0.0.0.0:30229?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="ws" uri="ws://0.0.0.0:30230?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/></transportConnectors><!-- destroy the spring context on shutdown to stop jetty --><shutdownHooks><bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /></shutdownHooks></broker><!--Enable web consoles, REST and Ajax APIs and demosThe web consoles requires by default login, you can disable this in the jetty.xml fileTake a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details--><import resource="jetty.xml"/></beans>
---
apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-jetty-realmnamespace: 你实际的namespace
data:jetty-realm.properties: |admin: my_mq_test, adminuser: user, user

在上面的配置中,我们在activemq.xml中使用简单授权配置以及修改了默认的端口号以提高服务的安全性;在jetty-realm.properties中配置了web端控制台的登录用户名和密码,格式为:

用户名 : 密码 ,角色名

步骤二:创建Deployment

接下来,我们需要创建一个Deployment,用来定义ActiveMQ的副本数量、镜像版本等相关信息。

apiVersion: apps/v1
kind: Deployment
metadata:name: activemq-singlenamespace: 你实际的namespace
spec:progressDeadlineSeconds: 600replicas: 1selector:matchLabels:app: activemq-singlestrategy:rollingUpdate:maxSurge: 50%maxUnavailable: 50%type: RollingUpdatetemplate:metadata:labels:app: activemq-singlespec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: project.nodeoperator: Invalues:- 你实际的节点名称volumes:- name: timezonehostPath:path: /usr/share/zoneinfo/Asia/Shanghai- name: config-activemqconfigMap: name: activemq-config-single- name: jetty-realmconfigMap: name: activemq-config-jetty-realmcontainers:- name: activemqimage: webcenter/activemq:5.14.3imagePullPolicy: IfNotPresentterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilevolumeMounts: - name: config-activemqmountPath: /opt/activemq/conf/activemq.xmlsubPath: activemq.xml- name: jetty-realmmountPath: /opt/activemq/conf/jetty-realm.propertiessubPath: jetty-realm.propertiesenv:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: POD_IPvalueFrom:fieldRef:fieldPath: status.podIP- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: TZvalue: "Asia/Shanghai"

在上述配置中,我们定义了一个名为activemq-single的Deployment。在这里,我们使用的镜像已经版本为webcenter/activemq:5.14.3,并且使用了之前创建的ConfigMap中的配置文件。

步骤三:创建Service

然后,我们还需要创建一个Service,用来将K8S集群中运行的ActiveMQ实例暴露为可访问的服务。

apiVersion: v1  
kind: Service  
metadata:  name: service-activemq-singlenamespace: 你实际的namespace
spec:  selector:  app: activemq-singletype: NodePortsessionAffinity: Noneports:- name: activemq-adminport: 8161targetPort: 8161nodePort: 30225- name: activemq-tcpport: 30226targetPort: 30226nodePort: 30226- name: activemq-amqpport: 30227targetPort: 30227nodePort: 30227- name: activemq-stompport: 30228targetPort: 30228nodePort: 30228- name: activemq-mqttport: 30229targetPort: 30229nodePort: 30229- name: activemq-wsport: 30230targetPort: 30230nodePort: 30230

步骤四:验证单机ActiveMQ

  • 首先,我们启动一个生产者链接到刚部署的单机ActiveMQ上,并且向名称为mdm_distribute_CostCenter的队列中发送了一条消息,消息内容为mdm_distribute_CostCenter

3.png

  • 接下来,我们再启动一个消息者同样链接到刚部署的单机ActiveMQ上,并且监听名为mdm_distribute_CostCenter的队列。

4.png

  • 最后,我们可以在web端的admin页面查看相应队列中的记录

6.png

小结

以上就是在K8S中部署单机ActiveMQ的相关步骤。通过这些步骤,我们成功地使用无状态的Deployment部署了一个可用的单机ActiveMQ。

二、部署ActiveMQ集群(networks of brokers)

步骤一:创建ConfigMap

与单机版类似,我们同样需要创建一个ConfigMap来存储和管理ActiveMQ的相关配置。

apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-node-0namespace: 你实际的namespace
data:activemq.xml: |<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- Allows us to use system properties as variables in this configuration file --><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><value>file:${activemq.conf}/credentials.properties</value></property></bean><!-- Allows accessing the server log --><bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"lazy-init="false" scope="singleton"init-method="start" destroy-method="stop"></bean><!--The <broker> element is used to configure the ActiveMQ broker.--><broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq-node-0" dataDirectory="${activemq.data}"><networkConnectors><networkConnector userName="my_mq_test" password="my_mq_test" uri="static:(tcp://你的实际ip:30220)" duplex="true"/></networkConnectors>		<plugins><simpleAuthenticationPlugin><users><authenticationUser username="my_mq_test" password="my_mq_test" groups="users,admins"/></users></simpleAuthenticationPlugin></plugins><destinationPolicy><policyMap><policyEntries><policyEntry topic=">" ><!-- The constantPendingMessageLimitStrategy is used to preventslow topic consumers to block producers and affect other consumersby limiting the number of messages that are retainedFor more information, see:http://activemq.apache.org/slow-consumer-handling.html--><pendingMessageLimitStrategy><constantPendingMessageLimitStrategy limit="1000"/></pendingMessageLimitStrategy></policyEntry></policyEntries></policyMap></destinationPolicy><!--The managementContext is used to configure how ActiveMQ is exposed inJMX. By default, ActiveMQ uses the MBean server that is started bythe JVM. For more information, see:http://activemq.apache.org/jmx.html--><managementContext><managementContext createConnector="false"/></managementContext><!--Configure message persistence for the broker. The default persistencemechanism is the KahaDB store (identified by the kahaDB tag).For more information, see:http://activemq.apache.org/persistence.html--><persistenceAdapter><kahaDB directory="${activemq.data}/kahadb"/></persistenceAdapter><!--The systemUsage controls the maximum amount of space the broker willuse before disabling caching and/or slowing down producers. For more information, see:http://activemq.apache.org/producer-flow-control.html--><systemUsage><systemUsage><memoryUsage><memoryUsage percentOfJvmHeap="70" /></memoryUsage><storeUsage><storeUsage limit="100 gb"/></storeUsage><tempUsage><tempUsage limit="50 gb"/></tempUsage></systemUsage></systemUsage><!--The transport connectors expose ActiveMQ over a given protocol toclients and other brokers. For more information, see:http://activemq.apache.org/configuring-transports.html--><transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name="openwire" uri="tcp://0.0.0.0:30218?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="amqp" uri="amqp://0.0.0.0:30221?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="stomp" uri="stomp://0.0.0.0:30222?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="mqtt" uri="mqtt://0.0.0.0:30223?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="ws" uri="ws://0.0.0.0:30224?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/></transportConnectors><!-- destroy the spring context on shutdown to stop jetty --><shutdownHooks><bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /></shutdownHooks></broker><!--Enable web consoles, REST and Ajax APIs and demosThe web consoles requires by default login, you can disable this in the jetty.xml fileTake a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details--><import resource="jetty.xml"/></beans>
---
apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-node-1namespace: 你实际的namespace
data:activemq.xml: |<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- Allows us to use system properties as variables in this configuration file --><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><value>file:${activemq.conf}/credentials.properties</value></property></bean><!-- Allows accessing the server log --><bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"lazy-init="false" scope="singleton"init-method="start" destroy-method="stop"></bean><!--The <broker> element is used to configure the ActiveMQ broker.--><broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq-node-0" dataDirectory="${activemq.data}">		<networkConnectors><networkConnector userName="my_mq_test" password="my_mq_test" uri="static:(tcp://你的实际ip:30218)" duplex="true"/></networkConnectors><plugins><simpleAuthenticationPlugin><users><authenticationUser username="my_mq_test" password="my_mq_test" groups="users,admins"/></users></simpleAuthenticationPlugin></plugins><destinationPolicy><policyMap><policyEntries><policyEntry topic=">" ><!-- The constantPendingMessageLimitStrategy is used to preventslow topic consumers to block producers and affect other consumersby limiting the number of messages that are retainedFor more information, see:http://activemq.apache.org/slow-consumer-handling.html--><pendingMessageLimitStrategy><constantPendingMessageLimitStrategy limit="1000"/></pendingMessageLimitStrategy></policyEntry></policyEntries></policyMap></destinationPolicy><!--The managementContext is used to configure how ActiveMQ is exposed inJMX. By default, ActiveMQ uses the MBean server that is started bythe JVM. For more information, see:http://activemq.apache.org/jmx.html--><managementContext><managementContext createConnector="false"/></managementContext><!--Configure message persistence for the broker. The default persistencemechanism is the KahaDB store (identified by the kahaDB tag).For more information, see:http://activemq.apache.org/persistence.html--><persistenceAdapter><kahaDB directory="${activemq.data}/kahadb"/></persistenceAdapter><!--The systemUsage controls the maximum amount of space the broker willuse before disabling caching and/or slowing down producers. For more information, see:http://activemq.apache.org/producer-flow-control.html--><systemUsage><systemUsage><memoryUsage><memoryUsage percentOfJvmHeap="70" /></memoryUsage><storeUsage><storeUsage limit="100 gb"/></storeUsage><tempUsage><tempUsage limit="50 gb"/></tempUsage></systemUsage></systemUsage><!--The transport connectors expose ActiveMQ over a given protocol toclients and other brokers. For more information, see:http://activemq.apache.org/configuring-transports.html--><transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name="openwire" uri="tcp://0.0.0.0:30220?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="amqp" uri="amqp://0.0.0.0:30221?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="stomp" uri="stomp://0.0.0.0:30222?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="mqtt" uri="mqtt://0.0.0.0:30223?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="ws" uri="ws://0.0.0.0:30224?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/></transportConnectors><!-- destroy the spring context on shutdown to stop jetty --><shutdownHooks><bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /></shutdownHooks></broker><!--Enable web consoles, REST and Ajax APIs and demosThe web consoles requires by default login, you can disable this in the jetty.xml fileTake a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details--><import resource="jetty.xml"/></beans>
---
apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-jetty-realmnamespace: 你实际的namespace
data:jetty-realm.properties: |admin: my_mq_test, adminuser: user, user

步骤二:创建Deployment

接下来,我们需要创建2个Deployment,分别对应ActiveMQ集群中的2个节点。主要区别在于使用ConfigMap中的配置文件的不同和containers中暴露的端口不同。

apiVersion: apps/v1
kind: Deployment
metadata:name: activemq-node-0namespace: 你实际的namespace
spec:progressDeadlineSeconds: 600replicas: 1selector:matchLabels:app: activemq-node-0strategy:rollingUpdate:maxSurge: 50%maxUnavailable: 50%type: RollingUpdatetemplate:metadata:labels:app: activemq-node-0name: activemq-nodespec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: project.nodeoperator: Invalues:- 你实际的节点名称volumes:- name: timezonehostPath:path: /usr/share/zoneinfo/Asia/Shanghai- name: config-activemqconfigMap: name: activemq-config-node-0- name: jetty-realmconfigMap: name: activemq-config-jetty-realmcontainers:- name: activemqimage: webcenter/activemq:5.14.3imagePullPolicy: IfNotPresentterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilevolumeMounts: - name: config-activemqmountPath: /opt/activemq/conf/activemq.xmlsubPath: activemq.xml- name: jetty-realmmountPath: /opt/activemq/conf/jetty-realm.propertiessubPath: jetty-realm.propertiesenv:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: POD_IPvalueFrom:fieldRef:fieldPath: status.podIP- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: TZvalue: "Asia/Shanghai"
---
apiVersion: apps/v1
kind: Deployment
metadata:name: activemq-node-1namespace: 你实际的namespace
spec:progressDeadlineSeconds: 600replicas: 1selector:matchLabels:app: activemq-node-1strategy:rollingUpdate:maxSurge: 50%maxUnavailable: 50%type: RollingUpdatetemplate:metadata:labels:app: activemq-node-1name: activemq-nodespec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: project.nodeoperator: Invalues:- 你实际的节点名称volumes:- name: timezonehostPath:path: /usr/share/zoneinfo/Asia/Shanghai- name: config-activemqconfigMap: name: activemq-config-node-1- name: jetty-realmconfigMap: name: activemq-config-jetty-realmcontainers:- name: activemqimage: webcenter/activemq:5.14.3imagePullPolicy: IfNotPresentterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilevolumeMounts: - name: config-activemqmountPath: /opt/activemq/conf/activemq.xmlsubPath: activemq.xml- name: jetty-realmmountPath: /opt/activemq/conf/jetty-realm.propertiessubPath: jetty-realm.propertiesenv:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: POD_IPvalueFrom:fieldRef:fieldPath: status.podIP- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: TZvalue: "Asia/Shanghai"

步骤三:创建Service

然后,我们还需要来创建Service,用来将K8S集群中运行的ActiveMQ实例暴露为可访问的服务。这里同样需要创建2个Service,分别对应步骤二中的2个Deployment,还需要1个Service来暴露公共的端口。

apiVersion: v1  
kind: Service  
metadata:  name: service-activemq-commonnamespace: 你实际的namespace
spec:  selector:  name: activemq-nodetype: NodePortsessionAffinity: Noneports:- name: activemq-amqpport: 30221targetPort: 30221nodePort: 30221- name: activemq-stompport: 30222targetPort: 30222nodePort: 30222- name: activemq-mqttport: 30223targetPort: 30223nodePort: 30223- name: activemq-wsport: 30224targetPort: 30224nodePort: 30224
---
apiVersion: v1
kind: Service
metadata:name: service-activemq-node-0namespace: 你实际的namespace
spec:selector:app: activemq-node-0type: NodePortsessionAffinity: Noneports:- name: activemq-adminport: 8161targetPort: 8161nodePort: 30217- name: activemq-tcpport: 30218targetPort: 30218nodePort: 30218
---
apiVersion: v1
kind: Service
metadata:name: service-activemq-node-1namespace: 你实际的namespace
spec:selector:app: activemq-node-1type: NodePortsessionAffinity: Noneports:- name: activemq-adminport: 8161targetPort: 8161nodePort: 30219- name: activemq-tcpport: 30220targetPort: 30220nodePort: 30220

步骤五:验证ActiveMQ集群

  • 首先,我们启动一个生产者链接到刚部署的集群ActiveMQ上,并且向名称为mdm_distribute_Employee的队列中发送了一条消息,消息内容为mdm_distribute_Employee

2.png

  • 接下来,我们再启动一个消息者同样链接到刚部署的集群ActiveMQ上,并且监听名为mdm_distribute_Employee的队列。

1.png

  • 最后,我们可以在web端的admin页面查看相应队列中的记录

5.png

小结

在K8S中部署ActiveMQ集群的相关步骤已经介绍完毕。通过这些步骤,我们成功地使用无状态的Deployment部署了一个可用的ActiveMQ集群。

结论

本文详尽地探讨了在K8S环境中部署ActiveMQ单机与集群的详细步骤。细读全文,我们可以发现,ActiveMQ的数据存储仍在POD中,这是由于业务需求所决定的。当发送MQ消息时,数据需要先被写入数据库,然后再进行发送,因此ActiveMQ的数据存储变得无关紧要。当然,我们还可以选择使用pvc或者直接挂载到宿主机等方式来保存数据。相较于传统的手动部署方式,利用K8S进行部署能够带来更高的便捷性和效率,从而更快速地完成ActiveMQ集群的部署和管理任务。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/166689.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

申请二级域名

1、登录腾讯云 腾讯云 产业智变云启未来 - 腾讯 (tencent.com) 2、进入我的域名&#xff0c;点击主域名 3、点击前往DNSPod管理 4、点击我的域名&#xff0c;然后点击主域名 5、点击添加记录&#xff0c;进行添加二级域名信息 6、添加相应二级域名信息 7、添加后需要进行验证…

PSP - 从头搭建 抗原类别 (GPCR) 的 蛋白质结构预测 项目流程

欢迎关注我的CSDN&#xff1a;https://spike.blog.csdn.net/ 本文地址&#xff1a;https://spike.blog.csdn.net/article/details/134595717 GPCRs&#xff08;G Protein-Coupled Receptors&#xff0c;G蛋白偶联受体&#xff09;&#xff0c;又称为7次跨膜受体&#xff0c;是细…

界面组件Telerik UI for WinForms中文教程 - 创建明暗模式的桌面应用

黑暗模式现在在很多应用程序中都挺常见的&#xff0c;但如何在桌面应用程序中实现它呢&#xff1f;这很简单&#xff0c;本文将为大家介绍如何使用一个类和命令行调用来实现&#xff01; Telerik UI for WinForms拥有适用Windows Forms的110多个令人惊叹的UI控件。所有的UI fo…

Appium 全新 2.0 全新跨平台生态,版本特性抢鲜体验!

关于Appium V2 Appium V2 beta版本在2021年发布&#xff0c;从2022年1月1号开始&#xff0c;Appium核心团队不会再维护Appium 1.x版本了&#xff0c;所有近期官方发布的平台驱动&#xff08;如Android平台的UIAutomator&#xff0c;IOS平台的XCUITest&#xff09;不再兼容Appi…

shrio----(1)基础

文章目录 前言 一、Shrio1、什么是shiro2、为什么使用shrio 二、主要类2.1、Subject2.2、SecurityManager2.3、Realms 三、认证授权3.1、认证(Authentication)3.2、授权&#xff08;authorization&#xff09;四、入门示例参考文章 前言 简单入门介绍 一、Shrio http://shir…

【译】Spring 6 入参数据校验: 综合指南

一、前言 在 Spring 6.1 中&#xff0c;有一个非常值得注意的重要改进——编程式验证器实现。Spring 长期以来一直通过注解支持声明式验证&#xff0c;而 Spring 6.1 则通过提供专用的编程式验证方法引入了这一强大的增强功能。 编程式验证允许开发人员对验证过程进行细粒度控…

网站定制开发有哪些分类?|企业软件app小程序定制

网站定制开发有哪些分类&#xff1f;|企业软件app小程序定制 网站定制开发是指根据客户需求&#xff0c;为其量身定制设计和开发的网站服务。目前&#xff0c;网站定制开发主要分为以下几个分类&#xff1a; 1. 静态网站定制开发&#xff1a;静态网站是由HTML、CSS和JavaScrip…

手写promise(3)-- 实例方法 静态方法

目录 实例方法 catch finally 静态方法 reslove reject race all allSettled any 实例方法 提供给promise实例的方法 包括catch 与finally catch Promise 实例的 catch() 方法用于注册一个在 promise 被拒绝时调用的函数。它会立即返回一个等效的 Promise 对象&…

一文详解 requests 库中 json 参数和 data 参数的用法

在requests库当中&#xff0c;requests请求方法&#xff0c;当发送post/put/delete等带有请求体的请求时&#xff0c;有json和data2个参数可选。 众所周知&#xff0c;http请求的请求体格式主要有以下4种&#xff1a; application/json applicaiton/x-www-from-urlencoded …

java堆文件排查

技术主题 在之前的开发的一个项目中&#xff0c;因为程序的一个bug&#xff0c;导致一些引用的对象一直没有回收&#xff0c;从而导致堆内存一直在增大&#xff0c;老年代一直在增大&#xff0c;老年代进行堆积&#xff0c;后来的排查思路是通过dump堆的文件&#xff0c;然后对…

Dockerfile-CentOS7.9+Python3.11.2

本文为CentOS7.9下安装Python3.11.2环境的Dockerfile # CentOS with Python3.11.2 # Author xxmail.com# build a new image with basic centos FROM centos:centos7.9.2009 # who is the author MAINTAINER xxmail.comRUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/…

vue的生命周期及不同阶段状态可以进行的行为

什么是vue的生命周期&#xff1f; Vue 的实例从创建到销毁的过程 &#xff0c;就是生命周期 &#xff0c;也就是从开始创建 &#xff0c;初始化数据 &#xff0c;编译模板 &#xff0c;挂载Dom到渲染DOM &#xff0c;更新数据再到渲染 &#xff0c;卸载等一系列的过程 &#x…

OpenAI研发神秘“Q*”模型:科学家认输,AI赢了人类关键一战

图片来源&#xff1a;视觉中国 作者丨叶蓁 编辑丨康晓 出品丨深网腾讯新闻小满工作室 在山姆奥特曼&#xff08;Sam Altman&#xff09;被OpenAI前董事会突然罢免之前&#xff0c;数位研究人员向董事会发送了一封信&#xff0c;警告称他们发现了一种能够威胁到人类的强大人工…

IIS 基线安全加固操作

目录 账号管理、认证授权 ELK-IIS-01-01-01 ELK-IIS-01-01-02 ELK-IIS-01-01-03 ELK-IIS-01-01-04 日志配置 ELK-IIS-02-01-01 ELK-IIS-02-01-02 ​​​​​​​ ELK-IIS-02-01-03 通信协议 ELK-IIS-03-01-01 设备其他安全要求 ELK-IIS-04-01-01 ​​​​​​​ ELK-I…

【DDS】OpenDDS配置与使用

&#x1f60f;★,:.☆(&#xffe3;▽&#xffe3;)/$:.★ &#x1f60f; 这篇文章主要介绍OpenDDS配置与使用。 无专精则不能成&#xff0c;无涉猎则不能通。——梁启超 欢迎来到我的博客&#xff0c;一起学习&#xff0c;共同进步。 喜欢的朋友可以关注一下&#xff0c;下次更…

配电室智慧运维监控系统

配电室智能运维监控系统是一个综合性的管理系统&#xff0c;专门针对配电室的运维工作进行设计。依托电易云-智慧电力物联网&#xff0c;它融合了先进的监测技术、自动化技术、数据分析技术等&#xff0c;对配电室进行全方位、实时的智能化监控和管理&#xff0c;以提升配电室运…

关于 Google AMP 和 SEO

Google 于 2015 年首次推出 AMP&#xff0c;即加速移动页面。借助开源 AMP 框架&#xff0c;网页设计师可以制作快速加载的移动网页。该框架的创建是为了应对使用移动设备访问互联网的个人数量的增加。从那时起&#xff0c;谷歌一直在推动使用 AMP 来增强移动设备上的 SEO 和用…

【漏洞复现】好视通视频会议系统(fastmeeting) toDownload.do接口存在任意文件读取漏洞 附POC

漏洞描述 “好视通”是国内云视频会议知名品牌,拥有多项创新核心技术优势、多方通信服务牌照及行业全面资质 [5] ,专注为政府、公检法司、教育、集团企业等用户提供“云+端+业务全场景”解决方案。用全国产、高清流畅、安全稳定的云视频服务助力各行各业数字化转型。 其视频…

opencv-Meanshift 和 Camshift 算法

MeanShift 和 CamShift 都是用于目标跟踪的算法&#xff0c;基于颜色直方图的方法。它们主要用于在视频序列中追踪运动的对象。 MeanShift&#xff08;均值漂移&#xff09;: 原理: MeanShift 算法的基本思想是通过不断调整窗口的中心&#xff0c;使得窗口中的样本点的平均值向…