파일을 수정하세요 %ACTIVEMQ_BASE%/conf/activemq.xml, 사용자 이름과 비밀번호는 %ACTIVEMQ_BASE%/conf/credentials.properties에 저장됩니다,
activemq.xml 세부 사항은 다음과 같습니다:
<!-- 하나 이상의 라이선스로 Apache Software Foundation(ASF)에 라이선스됨 기여자 라이선스 계약. NOTICE 파일을 참고하세요. 저작권 소유권에 관한 추가 정보를 위해 이 글을 작성합니다. ASF는 이 파일을 Apache 라이선스 버전 2.0에 따라 귀하에게 제공합니다 ("라이선스"); 이 파일은 다음 사항을 준수할 때만 사용할 수 있습니다. 면허증. 라이선스 사본은 다음에서 받을 수 있습니다
http://www.apache.org/licenses/LICENSE-2.0
관련 법률에 의해 요구되거나 서면으로 합의된 경우를 제외하고, 소프트웨어 라이선스에 따라 배포되는 것은 "있는 그대로" 배포됩니다. 명시적이든 묵시적이든 어떠한 보증이나 조건도 없습니다. 권한과 관련된 특정 언어는 라이선스를 참조하십시오. 라이선스 하의 제한 사항. --> <!-- 스타트 니펫: 예시 --> <콩 xmlns="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.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- 이 구성 파일에서 시스템 속성을 변수로 사용할 수 있게 해줍니다 --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>File:${ActiveMQ.CONF}/credentials.properties</value> </property> </bean>
<!-- hawtio 콘솔에서 로그 검색이 가능해 --> <bean id="logQuery" class="org.fusesource.insight.log.log4j.Log4jLogQuery" lazy-init="false" scope="singleton" init-method="start" destroy-method="stop"> </bean>
<!-- <broker> 이 요소는 ActiveMQ 브로커를 구성하는 데 사용됩니다. --> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="true">
<destinationPolicy> <policyMap> <policyEntries> <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry>
<!-- 이력서 – > <policyEntry queue="PER.>" producerFlowControl="true" memoryLimit="10mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry>
<!-- 엔터프라이즈 - > <policyEntry queue="COM.>" producerFlowControl="true" memoryLimit="10mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry>
<!-- 취업 박람회 – > <policyEntry queue="RECR.>" producerFlowControl="true" memoryLimit="10mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry>
<!-- 마이크로 모집 --> <policyEntry queue="MCOM.>" producerFlowControl="true" memoryLimit="10mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry>
<!-- 마이크로 구직 - > <policyEntry queue="MPER.>" producerFlowControl="true" memoryLimit="10mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry>
<!-- 백엔드 - > <policyEntry queue="ERP.>" producerFlowControl="true" memoryLimit="10mb"> <!-- constantPendingMessageLimitStrategy는 방지를 위해 사용됩니다. 소비자가 생산자를 차단하고 다른 소비자에게 영향을 미치는 것을 늦추는 것 보존되는 메시지 수를 제한함으로써 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/slow-consumer-handling.html
--> <!-- 유통 전략 - > <dispatchPolicy> <!-- 순차적으로 배포 - > <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 회복 전략 - > <subscriptionRecoveryPolicy> <!-- 마지막 메시지만 복구하세요 --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> <pendingQueuePolicy> <!-- 먼저 메시지 참조를 메모리에 저장하고, 메모리 사용이 최대치일 경우 임시 파일 -->에 저장됩니다 <fileQueueCursor/> </pendingQueuePolicy> <pendingMessageLimitStrategy> <constantPendingMessageLimitStrategy limit="1000"/> </pendingMessageLimitStrategy> </policyEntry> </policyEntries> </policyMap> </destinationPolicy>
<!-- managementContext는 ActiveMQ가 노출되는 방식을 설정하는 데 사용됩니다 JMX. 기본적으로 ActiveMQ는 다음이 시작하는 MBean 서버를 사용합니다 JVM입니다. 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/jmx.html --> <managementContext> <managementContext createConnector="false"/> </managementContext>
<!-- 브로커에 대한 메시지 지속성을 설정하세요. 기본 지속성 메커니즘은 KahaDB 저장소(kahaDB 태그로 식별됨)입니다. 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/persistence.html --> <persistenceAdapter> <kahaDB directory="E:/activemq_data" enableJournalDiskSyncs="false" indexWriteBatchSize="1000" indexCacheSize="10000" journalMaxFileLength="32mb"
/> </persistenceAdapter>
<plugins> <!-- 인증 설정; 사용자 이름, 비밀번호 및 그룹 --> <simpleAuthenticationPlugin> <users> <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="admins"/> <authenticationUser username="${per.username}" password="${per.password}" groups="personal"/> <authenticationUser username="${mper.username}" password="${mper.password}" groups="mpersonal"/> <authenticationUser username="${com.username}" password="${com.password}" groups="company"/> <authenticationUser username="${mcom.username}" password="${mcom.password}" groups="mcompany"/> <authenticationUser username="${erp.username}" password="${erp.password}" groups="erp"/> <authenticationUser username="${recr.username}" password="${recr.password}" groups="recr"/> </users> </simpleAuthenticationPlugin>
<!-- 목적지 기반 권한 부여 메커니즘을 구성해 봅시다 --> <authorizationPlugin> <map> <authorizationMap> <authorizationEntries> <authorizationEntry queue=">" read="admins" write="admins" admin="admins" /> <authorizationEntry queue="PER.>" read="personal, mpersonal, company, mcompany, erp, recr" write="personal" admin="personal" /> <authorizationEntry queue="MPER.>" read="personal, mpersonal, company, mcompany, erp, recr" write="mpersonal" admin="mpersonal" /> <authorizationEntry queue="COM.>" read="personal, mpersonal, company, mcompany, erp, recr" write="company" admin="company" /> <authorizationEntry queue="MCOM.>" read="personal, mpersonal, company, mcompany, erp, recr" write="mcompany" admin="mcompany" /> <authorizationEntry queue="ERP.>" read="personal, mpersonal, company, mcompany, erp, recr" write="erp" admin="erp" /> <authorizationEntry queue="RECR.>" read="personal, mpersonal, company, mcompany, erp, recr" write="recr" admin="recr" />
<authorizationEntry topic="ActiveMQ.Advisory.>" read="personal, mpersonal, company, mcompany, erp, recr" write="personal, mpersonal, company, mcompany, erp, recr" admin="personal, personal, mpersonal, company, mcompany, ERP, recr" /> </authorizationEntries> </authorizationMap> </map> </authorizationPlugin> </plugins>
<!-- systemUsage는 브로커가 사용할 최대 공간을 제어합니다 캐시를 비활성화하거나 프로듀서의 속도를 늦추기 전에 사용하세요. 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/producer-flow-control.html --> <systemUsage> <systemUsage> <memoryUsage> <memoryUsage percentOfJvmHeap="100" /> </memoryUsage> <storeUsage> <storeUsage limit="1 gb"/> </storeUsage> <tempUsage> <tempUsage limit="100 mb"/> </tempUsage> </systemUsage> </systemUsage>
<!-- 트랜스포트 커넥터는 특정 프로토콜을 통해 ActiveMQ를 노출합니다. 고객과 다른 중개인들. 자세한 내용은 다음을 참조하세요:
http://activemq.apache.org/configuring-transports.html --> <transportConnectors> DOS 보호 <!--, 동시 연결 수를 1000개, 프레임 크기를 100MB로 제한할 수 있습니다 --> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="mqtt" uri="mqtt://0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> <transportConnector name="ws" uri="ws://0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> </transportConnectors>
<!-- 정지 시 스프링 컨텍스트를 파괴해 제티를 멈추게 할 수 있습니다 --> <shutdownHooks> <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /> </shutdownHooks>
</broker>
<!-- 웹 콘솔, REST 및 Ajax API 및 데모를 활성화하세요 웹 콘솔은 기본적으로 로그인이 필요하며, jetty.xml 파일 내에서 이를 비활성화할 수 있습니다
자세한 내용은 ${ACTIVEMQ_HOME}/conf/jetty.xml에서 확인해 보세요 --> <import resource="jetty.xml"/>
</beans> <!-- 끝 스니펫: 예시 -->
credentials.properties:
## --------------------------------------------------------------------------- ## 하나 이상의 라이선스로 Apache Software Foundation(ASF)에 라이선스됨 ## 기여자 라이선스 계약. NOTICE 파일을 참고하세요. ## 저작권 소유권에 관한 추가 정보를 위해 이 작품을 사용합니다. ## ASF는 이 파일을 Apache 라이선스 버전 2.0에 따라 귀하에게 제공합니다 ## ("라이선스"); 이 파일은 다음 사항을 준수할 때만 사용할 수 있습니다. ## 면허증. 라이선스 사본은 다음에서 받을 수 있습니다 ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## 적용 법률에 의해 요구되거나 서면으로 합의된 경우, 소프트웨어 ## 라이선스 하에 배포되는 것은 "있는 그대로" 배포됩니다, ## 명시적이든 묵시적이든 어떠한 보증이나 조건도 없습니다. ## 권한과 관련된 특정 문구는 라이선스를 참조하십시오. ## 라이선스 제한. ## ---------------------------------------------------------------------------
# 브로커에 접근하기 위해 구성 요소(예: 웹 콘솔)가 사용할 자격 증명을 정의합니다
activemq.username=*** activemq.password=***
per.username=*** per.password=***
mper.username=*** mper.password=***
com.username=*** com.password=***
mcom.username=*** mcom.password=***
erp.username=*** erp.password=***
recr.username=*** recr.password=***
위 구성에서 오늘 대기열 모니터링에 이상 현상이 있음을 발견했고, 마침내 문제는 여기서 나타났습니다:
큐 모니터링 프로젝트 관리자 계정은 system/manager(webapps\admin\WEB-INF\webconsole-embedded.xml
권한이 필요한 관리자 그룹입니다
|