You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Matt (JIRA)" <ji...@apache.org> on 2018/07/04 21:45:00 UTC
[jira] [Created] (CAMEL-12624) ActiveMQ Artemis AMQP integration
issue with topic prefix hardcode
Matt created CAMEL-12624:
----------------------------
Summary: ActiveMQ Artemis AMQP integration issue with topic prefix hardcode
Key: CAMEL-12624
URL: https://issues.apache.org/jira/browse/CAMEL-12624
Project: Camel
Issue Type: Bug
Components: camel-amqp
Affects Versions: 2.21.1
Reporter: Matt
Currently we are running Camel AMQP component against Active MQ 5 (Amazon MQ) we want to move to an Artemis solution but this hasn't worked seamlessly.
In CAMEL-9204 I believe a hardcoded topic prefix of "topic://" was introduced I think for a workaround of an Active MQ 5 bug.
In Artemis this means Camel connects to a topic named "topic://example.topic.event" instead of "example.topic.event" and therefore receives no events.
The only possible workaround is to manually create the connection factory which means then the topic prefix is not set.
My believe is that the hardcoded topic prefix is a bug and should be removed or an option to override at the AMQP component level should be introduced.
Bug location: AMQPComponent.java line 59
{code:java}
@Override
protected void doStart() throws Exception {
Set<AMQPConnectionDetails> connectionDetails = getCamelContext().getRegistry().findByType(AMQPConnectionDetails.class);
if (connectionDetails.size() == 1) {
AMQPConnectionDetails details = connectionDetails.iterator().next();
JmsConnectionFactory connectionFactory = new JmsConnectionFactory(details.username(), details.password(), details.uri());
connectionFactory.setTopicPrefix("topic://");
setConnectionFactory(connectionFactory);
}
super.doStart();
}{code:java}
Workaround:
{code:java}
@Bean
public ConnectionFactory amqpConnectionFactory() {
return new JmsConnectionFactory(username, password, url);
}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)