miércoles, 31 de agosto de 2022

Spring JMS

 JMS Pooling


https://community.pivotal.io/s/article/Using-Connection-Pooling-with-JMSTemplate-in-Spring-Framework?language=en_US

set a bean preloaded org.apache.activemq.pool.PooledConnectionFactory

<bean id="connectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">

This class PooledConnectionFactory has a field connectionFactory



which get broker url in class ActiveMQConnectionFactory




finally jmstemplate class is preloaded as bean and set its property to connectyfactory set above

< property name="connectionFactory" ref="connectionFactory"/>


Active MQ - setup windows 10

 https://stackoverflow.com/questions/72574570/activemq-startup-problem-on-windows-filenotfoundexception-for-jolokia-access-x/72575295#72575295


set ACTIVEMQ_HOME=C:\\my-programs\\apache-activemq-5.17.1-bin\\


set PATH=%ACTIVEMQ_HOME%\bin;%PATH%

c:\my-programs\apache-activemq-5.17.1-bin>activemq start


ACTIVEMQ_HOME: C:\my-programs\apache-activemq-5.17.1-bin

ACTIVEMQ_BASE: C:\my-programs\apache-activemq-5.17.1-bin

ACTIVEMQ_CONF: C:\my-programs\apache-activemq-5.17.1-bin\conf

ACTIVEMQ_DATA: C:\my-programs\apache-activemq-5.17.1-bin\data

Loading message broker from: xbean:activemq.xml

 INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[C:\my-programs\apache-activemq-5.17.1-bin\data\kahadb]

 INFO | KahaDB is version 7

 INFO | PListStore:[C:\my-programs\apache-activemq-5.17.1-bin\data\localhost\tmp_storage] started

 INFO | Apache ActiveMQ 5.17.1 (localhost, ID:LAPTOP-M1F6RIGI-59638-1661946020665-0:1) is starting

 INFO | Listening for connections at: tcp://LAPTOP-M1F6RIGI:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600

 INFO | Connector openwire started

 INFO | Listening for connections at: amqp://LAPTOP-M1F6RIGI:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600

 INFO | Connector amqp started

 INFO | Listening for connections at: stomp://LAPTOP-M1F6RIGI:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600

 INFO | Connector stomp started

 INFO | Listening for connections at: mqtt://LAPTOP-M1F6RIGI:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600

 INFO | Connector mqtt started

 INFO | Starting Jetty server

 INFO | Creating Jetty connector

 WARN | ServletContext@o.e.j.s.ServletContextHandler@47ffe971{/,null,STARTING} has uncovered http methods for path: /

 INFO | Listening for connections at ws://LAPTOP-M1F6RIGI:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600

 INFO | Connector ws started

 INFO | Apache ActiveMQ 5.17.1 (localhost, ID:LAPTOP-M1F6RIGI-59638-1661946020665-0:1) started

 INFO | For help or more information please see: http://activemq.apache.org

 INFO | ActiveMQ WebConsole available at http://127.0.0.1:8161/

 INFO | ActiveMQ Jolokia REST API available at http://127.0.0.1:8161/api/jolokia/


Using Power Shell

$Env:ACTIVEMQ_HOME="C:\\programs\\apache-activemq-5.17.1-bin\\"

$Env:JAVA_HOME="C:\programs\jdk-11.0.16.1+1"

$Env:PATH = "$Env:ACTIVEMQ_HOME\bin;$Env:PATH "

$Env:PATH = "$Env:JAVA_HOME\bin;$Env:PATH "


PS C:\workout> activemq start