ActiveMQ persistance Adapter configuration issue - activemq

i am new with ActiveMQ version (5.3) I have de following configuration, on the activemq.xml file:
<persistenceAdapter>
<amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb" />
</persistenceAdapter>
And now, i am trying to upgrade to version (5.13) and in this configuration it does not have the element amqPersistenceAdapter please help me to find and element that I can use in version 5.13

amqPersistenceAdapter was replaced with kahadb over the various ActiveMQ releases since 5.3. So take a look at kahadb in the ActiveMQ documentation how to use and configure it. In fact its configured to use kahadb out of the box, so take a look at the vanilla configuration from the ActiveMQ 5.13 release.
http://activemq.apache.org/kahadb.html

Related

Apollo takes 100% CPU

I use ActiveMQ Apollo 1.7.1 in Linux. I use MQTT to send message from server to client.
Apollo config like below:
<broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
<notes>
The default configuration with tls/ssl enabled.
</notes>
<log_category console="console" security="security" connection="connection" audit="audit"/>
<authentication domain="apollo"/>
<!-- Give admins full access -->
<access_rule allow="admins" action="*"/>
<access_rule allow="*" action="connect" kind="connector"/>
<virtual_host id="myapollo">
<host_name>myapollo</host_name>
<access_rule allow="users" action="connect create destroy send receive consume"/>
<leveldb_store directory="${apollo.base}/data"/>
</virtual_host>
<connector id="tcp" bind="tcp://0.0.0.0:61613"/>
<key_storage file="${apollo.base}/etc/keystore" password="password" key_password="password"/>
</broker>
Can someone tell me how to find information about why the Apollo process is taking 100% of the CPU?
After this problem happens we can't build new connections through TCP.
ActiveMQ Apollo has had no releases in almost a decade and the readme.md in the source code indicates the project is dead. Therefore you're unlikely to get much help. My recommendation would be to get a couple of thread dumps from the JVM, and then restart the broker. Hopefully things will return to normal, and then you can inspect the thread dumps to investigate the underlying cause of the CPU utilization.
Eventually you should switch to a broker under active development. Personally I'd recommend ActiveMQ Artemis which has replaced Apollo as the next-generation broker from ActiveMQ. MQTT is a standard protocol so you should be able to deploy any broker which implements MQTT and your clients should still work. For what it's worth, ActiveMQ Artemis recently implemented MQTT 5 so if you think you'll ever upgrade your clients to MQTT 5 you'll have a smooth upgrade path.

ActiveMQ Bridge Configuration for Solace

I have a requirement to create a bridge between a Queue in ActiveMQ and a Queue in Solace. When ever there is a message in ActiveMQ Queue it should automatically get transferred to SolaceQ.
I'm struggling to find the steps for this configuration. I have ActiveMQ installed on my local machine. Request you to please throw some light on this.
FYI: I'm very new to ActiveMQ/Solace
I think you'll need to do this via JMS since both ActiveMQ and Solace support it. Check out ActiveMQ's docs here: https://activemq.apache.org/jms-to-jms-bridge

How to monitor ActiveMQ queue in Apache James

We're using Apache James 3.0-beta4 which uses embedded ActiveMQ 5.5.0 for FIFO message queue, and sometimes messages get stuck. Therefore, we need to monitor it. Is there any way to monitor an ActiveMQ queue like message size and most recent message-id in the queue (if possible).
In the JAMES spring-server.xml I found that:
<amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/store/activemq/brokers" useShutdownHook="false" schedulerSupport="false" id="broker">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
<!-- Support priority handling of messages -->
<!-- http://activemq.apache.org/how-can-i-support-priority-queues.html -->
<amq:policyEntry queue=">" prioritizedMessages="true"/>
</amq:policyEntries>
</amq:policyMap>
</amq:destinationPolicy>
<amq:managementContext>
<amq:managementContext createConnector="false"/>
</amq:managementContext>
<amq:persistenceAdapter>
<amq:amqPersistenceAdapter/>
</amq:persistenceAdapter>
<amq:plugins>
<amq:statisticsBrokerPlugin/>
</amq:plugins>
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
also one old part from readme:
- Telnet Management has been removed in favor of JMX with client shell
- More metrics counters available via JMX
...
* Monitor via JMX (launch any JMX client and connect to URL=service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi)
which is confusion on how to use it.
This is part of the bigger "monolith" project which now is recreated for microservices but still need to be supported ;) All was fine till mid of March.
It looks like ActiveMQ management and monitoring is not possible because JMX is disabled.

ActiveMQ 5.11 with WebSphere Application Server 8.5

Does anybody know which jars from ActiveMQ 5.11 I need to use with IBM Websphere Application Server 8.5 in order to create a new ActiveMQ JMS Provider?
I found discussions related to older ActiveMQ versions that don't seem applicable anymore because the way ActiveMQ is packaged has changed:
https://www.ibm.com/developerworks/community/blogs/timdp/entry/using_activemq_as_a_jms_provider_in_websphere_application_server_7149?lang=en
ActiveMQ 5.11 doesn't seem to have activemq-core anymore, activeio-core is under "optional", and ActiveMQ seems to have switched from commons-logging to slf4j, which in itself seems to cause problems due to the fact that WAS itself ships an outdated version of the slf4j jars (see other questions here on SO).
Any advice is highly appreciated.
Figured it out. It's really simple actually. In the WAS console, go to Resources -> JMS -> JMS Providers, and create a new provider as:
Classpath:
C:/activemq-libs/activemq-client-5.10.0.jar
C:/activemq-libs/hawtbuf-1.10.jar
C:/activemq-libs/slf4j-api-1.7.5.jar
External initial context factory:org.apache.activemq.jndi.ActiveMQInitialContextFactory
External provider URL: tcp://myhost:61616
Then go to Resources -> JMS -> Queue Connection Factories and create a new one as:
Name: myQCF
JNDI Name: jms/myQueueConnectionFactory
External JNDI Name: QueueConnectionFactory
You can create a new Queue as (Resources -> JMS -> Queues):
Name: myQueue
JNDI Name: queue/myQueue
External JNDI Name: dynamicQueues/myQueue
Maarten

using Hyperic HQ 4.6 to monitor ActiveMQ 5.5

Does anyone know if I can use Hyperic HQ 4.6 supports ActiveMQ 5.5? I am trying to establish connection between them. I installed Hyperic HQ agent to a server that has ActiveMQ broker and I enabled useJmx on the broker.
But in Hyperic HQ server I can't find ActiveMQ process to monitor. I can see plenty of other services on that particular machine which I can monitor, but not ActiveMQ. How can I fix it?
UPDATE: Ok, I found a JIRA ticket https://jira.hyperic.com/browse/HHQ-4380 and I added 5.5 section to configuration file. Now autodiscovery works fine, but I don't see any statistics about queues and topics. I see information about activemq process in general: CPU usage, memory usage etc. Is it possible to add metrics about queues and topics?
UPDATE 2 Here is an article of how to make visible some ActiveMQ information - http://forums.hyperic.com/jiveforums/thread.jspa?messageID=69458&tstart=0 After uncommenting required lines I started too see infromation about resources: ActiveMQ.Advisory.Consumer.Topic.topic/eventsTopic, ActiveMQ.Advisory.Topic, topic/eventsTopic. But there is no my queues in the list. Help!
The functionality that you are after needs to be defined within an HQ plugin. FuseSource provide a commercially supported version of HQ as part of their subscriptions called Fuse HQ that has ActiveMQ plugins provided out of the box (along with the other products that are part of their offering: Camel, ServiceMix and CXF). With it you can monitor individual queues, topics, connectors as well as whole brokers.