Tuesday, November 16, 2021

Camel & ActiveMQ


XML File

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="        http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd        http://camel.apache.org/schema/spring       https://camel.apache.org/schema/spring/camel-spring-2.23.3.xsd">


    <bean class="org.apache.activemq.ActiveMQConnectionFactory" id="jmsConnectionFactory">

        <property name="brokerURL" value="tcp://localhost:61616"/>

    </bean>

    <bean class="org.apache.activemq.pool.PooledConnectionFactory"

        destroy-method="stop" id="pooledConnectionFactory" init-method="start">

        <property name="maxConnections" value="8"/>

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

    </bean>

    

    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

        <route id="simple-route">

<from id="_to2" uri="activemq:queue:sample?connectionFactory=#pooledConnectionFactory" />

<log id="route-log" message=">>> ${body}" />

</route>

    </camelContext>

</beans>




No comments:

Post a Comment

Install and use xorg-server on macOS via Homebrew

  The instructions to install and use xorg-server on macOS via Homebrew: Install Homebrew (if you haven't already): /bin/bash -c ...