activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-1895) activemq.xml embedded camel context cannot resolve a broker if port other than default(61616) is used for tcp transport
Date Wed, 20 Aug 2008 08:17:52 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Tully resolved AMQ-1895.
-----------------------------

    Resolution: Fixed

rev  687280

addition to camel config in activemq,xml to use vm transport for the activemq component broker
url.
{code}
    <!-- configure the camel activemq component to use the current broker -->
    <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
        <property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000"
/>
    </bean>
{code}
Making this the camel activemq component default broker url (and updating the camel dependency),
and this config can be removed, At the moment the camel defalult url uses port 61616.

> activemq.xml embedded camel context cannot resolve  a broker if port other than default(61616)
is used for tcp transport
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1895
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1895
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: all
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.2.0
>
>
> The camel context defined in acrtivemq.xml  does not specify a camel activeMQComponent
(where a brokerUrl could be specified) and hence false back to the use of the default broker
URL from ActiveMQConnectionFactory. This breaks down when a non default port is specified
for the broker.
> The result is the camel context continually retrying to connect to a non existent port.
> It may make sense to pull the camel context out of the default activemq.xml altogether
but with it present, it may make sense to have the camel activmqcomponent use a default broker
url that uses the vm transport as the context will always be embedded in a broker.
> One issue with the use of vm transport is that the first use of the transport creates
an embedded broker. With the xbean xml, the camel context bean starts before the brokerService
so the result is two brokers.
> It would be usefull if the vm transport url allowed an option to wait for a broker to
start so that the camel context can reliably use the vm transport without the possibility
of creating a separate embedded broker.
> Something like the following would work:
> {code} vm://localhost?waitForStart=10000&create=false {code}
> In this way, the camel embedded connection factory would wait up to 10 seconds for the
localhost broker to start and fail with an exception (b/c create=false) in the event that
the broker does not start within that time.
> This would be a sensible default url for the activemq camel component in the acrtivemq.xml
such that it is independent of transport options used by the broker.
> (The spring depends-on workaround for this ordering dependency only works in a complete
spring context)
> {code}
>     <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"
>
>         <property name="brokerURL" value="vm://localhost?waitForStart=10000&create=false"
/>
>     </bean>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message