Migrating a standalone ActiveMQ broker to Fabric

Solution In Progress - Updated -

Issue

I am trying to migrate a standalone ActiveMQ broker to a Fabric environment. I'd like to know how to configure login.config file as part of a profile:

broker-config {
    org.apache.activemq.jaas.PropertiesLoginModule required
        debug=true
        org.apache.activemq.jaas.properties.user="users.properties"
        org.apache.activemq.jaas.properties.group="groups.properties";
};

The objective is to configure the legacy standalone ActiveMQ broker, in Fabric environment started up with the predefined queues and authorization rules. Typically I have created a profile inheriting from the "mq" profile to start a new MQ broker container.

Here is the legacy standalone ActiveMQ broker configure on pre-defined destinations:

    <destinations>
        <queue physicalName="BarQueue" />
        <queue physicalName="HousingQueue" />
        <queue physicalName="DLQ.BarQueue" />
        <queue physicalName="DLQ.HousingQueue" />
    </destinations>

authorizationPlugin:

    <plugins>
        <jaasAuthenticationPlugin configuration="karaf" />
        <authorizationPlugin>
            <map>
                <authorizationMap>
                    <authorizationEntries>
                        <authorizationEntry queue="BarQueue" read="barusers,admins" write="barusers,admins" admin="admins" />
                        <authorizationEntry queue="HousingQueue" read="housingusers,admins" write="housingusers,admins" admin="housingusers,admins" />
                        <authorizationEntry topic="ActiveMQ.Advisory.>" read="barusers,housingusers,admins" write="barusers,housingusers,admins" admin="barusers,housingusers,admins"/>  
                    </authorizationEntries>
                    <tempDestinationAuthorizationEntry>
                        <tempDestinationAuthorizationEntry read="admins" write="admins" admin="admins"/>
                    </tempDestinationAuthorizationEntry>
                </authorizationMap>
            </map>
        </authorizationPlugin>
    </plugins>

persistenceAdapter:

<persistenceAdapter>
    <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
</persistenceAdapter>

transportConnector:

<transportConnectors>
    <transportConnector name="openwire" uri="tcp://0.0.0.0:${mqbroker.port}"/>
</transportConnectors>

datasource for JDBCPersistentAdapter:

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
    <property name="username" value="root"/>
    <property name="password" value="root"/>
    <property name="maxActive" value="200"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>

Environment

  • JBoss A-MQ
    • 6.0
  • JBoss Fuse
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.