activemq broker redeliveryPlugin configuration not working for topic - activemq

I have the following configuration in by conf/activemq.xml file
<plugins>
<redeliveryPlugin fallbackToDeadLetter="true" sendToDlqIfMaxRetriesExceeded="true">
<redeliveryPolicyMap>
<redeliveryPolicyMap>
<defaultEntry>
<redeliveryPolicy maximumRedeliveries="20" useExponentialBackOff="true" initialRedeliveryDelay="60000" redeliveryDelay="60000" maximumRedeliveryDelay="600000"/>
</defaultEntry>
</redeliveryPolicyMap>
</redeliveryPolicyMap>
</redeliveryPlugin>
</plugins>
I am using activemq-5.11 with Spring/JMS/Camel/JTA (Atomikos).
Because, I am using JTA/XA transactions, the redelivery policy at the activeMQ connection factory is not working for topics.
So I am trying to set the redelivery Policy on the server.
However, it seems to be continuously resending the topic message.
PS. I have only one subscriber (durable).

I was able to resolve the issue.
In my case, the issue was that I was using the redelivery policy at the client side also. And somehow, that was messing it up.
Since I am using JTA, I wanted no retying at the client side and wanted the message to be retired from the ActiveMQ broker server. And Once I removed all error handling and redelivery policy from the Camel configuration, it worked like as it should.
Hope this helps someone in the future.

Related

ActiveMQ integration with Oracle Service bus(OSB) 12c

we are trying to do the assessment around ActiveMQ to use in OSB 12c as JMS based integration. I did follow few blogs like https://bizzperform.com/blog/?p=686 but this is not helping and generating error like below.
did anyone came across this scenario and did implemented same .. kinldy advise.
<Failed to check whether connection factory LocalConnectionFactory supports XA. Will assume it does not: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException:
Active MQ client jar is missing from domain class path, you need to download it and add to PRE_CLASSPATH
Thanks, I finally got it working.
two quick changes and that worked
added the jar file in setDomainEnv.cmd like this
set PRE_CLASSPATH=%DOMAIN_HOME%\lib\activemq-all-5.16.3.jar;%PRE_CLASSPATH%
or you can put the complete URL of domain home.
while configuring the JMS on OSB, its always tricky to set the JNDI and I had to use both like below
jms://localhost:7001//
this helped and established a connection.

Can I ignore CWWKS3005E messages on worklight server logs?

I have an application running on Worklight 6.1 and I am seeing this messages on the log.
CWWKS3005E: A configuration exception has occurred. No UserRegistry implementation service is available
I don't need to authenticate the users on my application, can I ignore this message?
I'm not sure, but you can try to cancel logging for this specific package using following log configuration in server.xml:
<logging traceSpecification="XXX.XXX.*=off=disabled"/>
where XXX.XXX.* is the package where the error was occurred.
Here is a list of all available log levels: http://www-01.ibm.com/support/knowledgecenter/SSCKBL_8.5.5/com.ibm.websphere.nd.doc/ae/utrb_loglevel.html
I understand that you are not asked how to remove these messages from the log file, but you asked should you worry about these messages.
Anyway this log is not of Worklight server, it generated by Liberty server. It means you have something wrong in server configuration.
I found that this messages is because my server.xml configuration file of WebSphere Liberty Profile contains this feature
appSecurity-1.0
And I am not defining any User Registry.
http://pic.dhe.ibm.com/infocenter/rsahelp/v8r5/topic/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_feat.html
I am not running the Application Center in this profile and I am securing the Worklight console using properties in the worklight.properties file.
So, the question is can I remove the appSecurity feature?
Add <basicRegistry></basicRegistry> to your server.xml.

Mule DevKit Connectors, Connection Management and reconnect policies

Should a custom Mule connector written using the DevKit be compatible by default with reconnection policies. e.g., I wrote a connector using connection management following http://www.mulesoft.org/documentation/display/current/Implementing+Connection+Management
When I set up an error condition and my #Connect method throws a ConnectionException my flow stops and the connector doesn't try to reconnect despite having a global config element:
<configuration>
<reconnect-forever frequency="2000"/>
</configuration>
I know this config is working because it has the expected effect on a JDBC transport but not on my custom connector.
Am I missing something fundamental? Should custom connectors work at all with reconnect-forever policies?
I'm using Mule 3.4 CE and DevKit 3.4
Thanks for any help or pointers in the right direction.
In DevKit, in order for your operations to trigger the reconnection mechanism you need to mark the processor with the #ReconnectOn annotation, and specify the exception that will trigger the reconnection.
#Processor
#ReconnectOn(exceptions = {TypeAException.class, TypeBException.class})
public boolean fooProcessor(String param)
throws TypeAException, TypeBException, TypeCException;
In this example the exception of TypeCException will not trigger the reconnection, the others will.
If your #ValidateConnection method returns true, the #Connect won't be called again.

mule 3.3.1 threading profile

I use mule 3.3.1 CE .
I see that UDP connector is not receiving the traffic with the following threading profile settings
<udp:connector name="udpConnector" receiveBufferSize="1024" sendBufferSize="1024">
<receiver-threading-profile maxThreadsActive="5" maxBufferSize="5"/>
</udp:connector>
The issue stays the same when I moved it up to the configuration level
<configuration>
<default-receiver-threading-profile maxThreadsActive="5" maxBufferSize="5"/>
</configuration>
<udp:connector name="udpConnector" receiveBufferSize="1024" sendBufferSize="1024"/>
However , mule starts receiving traffic with out threading profile settings
<udp:connector name="udpConnector" receiveBufferSize="1024" sendBufferSize="1024"/>
I am not sure if the issue is specific with mule 3.3.1.
any help is much appreciated
I had a bug raised about something similar before. There is a bug when defining the values for maxBufferSize and poolExhaustedAction in the threading profile configuration without defining the "maxThreadsIdle" attribute.
However if you set the maxThreadsIdle to any value higher than 1 in your threading profile the problem should be solved. This could be the same issue.

Does ActiveMQ always require the KahaDB library, even when using JDBC persistence?

I'm trying to set up the following broker using JDBC persistence:
<amq:broker id="activeMQBroker" brokerName="activeMQBroker" useJmx="false" persistent="true">
<amq:transportConnectors>
<amq:transportConnector name="vm" uri="vm://activeMQBroker" />
</amq:transportConnectors>
<amq:persistenceAdapter>
<amq:jdbcPersistenceAdapter dataSource="#dataSource" />
</amq:persistenceAdapter>
</amq:broker>
On startup, I get:
java.lang.NoClassDefFoundError: org/apache/kahadb/page/Transaction$Closure
If I add the KahaDB JAR to the classpath, all is well and the ActiveMQ database tables get created (in Postgres). I'd rather not have this additional dependency, though, since I'm not using it.
Any idea why ActiveMQ is still looking for KahaDB, even though I'm using JDBC? I tried setting schedulerSupport="false", as described in this question, but no luck.
P.S. Could someone with enough rep please create a "KahaDB" tag?
Current versions of ActiveMQ are tied pretty hard to KahaDB. The TempStore uses a paged list that uses KahaDB underneath as well. Its simplest to just include the library.