You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by komal bhola <ko...@gmail.com> on 2014/05/12 09:24:50 UTC

Hi I wanna use camel 's embedded in active mq

Hi ,

I have implemented camel with blueprint implementation. 
Please provide some guide or tutorial. All i find are spring tutorials. 

My Code is as follows:

Camel Context : 
	<route id="activeMQ">
		<from uri="direct:activeMQ" />
		
		<setExchangePattern pattern="InOnly" />
		
		<to uri="jms:queue:test?requestTimeout=75000" />
	</route>

	<route>
		<from uri="jms:queue:test" />
		<bean ref="serviceProcessor" method="activeMQTesting"/>
	</route>


<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
				<property name="configuration" ref="jmsConfig" />
   		 </bean>

<bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration"> 
				<property name="connectionFactory" ref="pooledConnectionFactory"/>
				<property name="concurrentConsumers" value="10"/> 
				<property name="transacted" value="true"/> 
			</bean> 

<bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="maxConnections" value="8" />
    
    <property name="connectionFactory" ref="jmsConnectionFactory" />
  </bean>
  

  <bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="vm://myBroker" />
    <property name="userName" value="admin"/>
    <property name="password" value="admin"/>
    
  </bean>


In between my transactions i want to send data to queue asynchronously. 
Using other route i want to read messages from queue and process. 

My Pom.xml:

 
 
    	<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-jms</artifactId>
			<version>${camelversion}</version>
		</dependency>
		
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-camel</artifactId>
			<version>5.6.0</version>
		</dependency>

When i install my bundle in fuse a lot of extra bundles are installed. I dun
know why? Also my bundle is not get started.


Please help and suggest what am i doing wrong. What am i missing?

I dun wana run active mq separately, i want to use embedded activemq of
apapche camel.

Please help!!!

Regards,
Komal



--
View this message in context: http://camel.465427.n5.nabble.com/Hi-I-wanna-use-camel-s-embedded-in-active-mq-tp5751012.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Hi I wanna use camel 's embedded in active mq

Posted by Christian Posta <ch...@gmail.com>.
What do you mean a lot of extra bundles get installed?
Running amq in embedded mode like you're trying is definitely doable.
Have you checked the logs to see why your bundle isn't started correctly?

On Mon, May 12, 2014 at 12:24 AM, komal bhola <ko...@gmail.com> wrote:
> Hi ,
>
> I have implemented camel with blueprint implementation.
> Please provide some guide or tutorial. All i find are spring tutorials.
>
> My Code is as follows:
>
> Camel Context :
>         <route id="activeMQ">
>                 <from uri="direct:activeMQ" />
>
>                 <setExchangePattern pattern="InOnly" />
>
>                 <to uri="jms:queue:test?requestTimeout=75000" />
>         </route>
>
>         <route>
>                 <from uri="jms:queue:test" />
>                 <bean ref="serviceProcessor" method="activeMQTesting"/>
>         </route>
>
>
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                                 <property name="configuration" ref="jmsConfig" />
>                  </bean>
>
> <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>                                 <property name="connectionFactory" ref="pooledConnectionFactory"/>
>                                 <property name="concurrentConsumers" value="10"/>
>                                 <property name="transacted" value="true"/>
>                         </bean>
>
> <bean id="pooledConnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="maxConnections" value="8" />
>
>     <property name="connectionFactory" ref="jmsConnectionFactory" />
>   </bean>
>
>
>   <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
>     <property name="brokerURL" value="vm://myBroker" />
>     <property name="userName" value="admin"/>
>     <property name="password" value="admin"/>
>
>   </bean>
>
>
> In between my transactions i want to send data to queue asynchronously.
> Using other route i want to read messages from queue and process.
>
> My Pom.xml:
>
>
>
>         <dependency>
>                         <groupId>org.apache.camel</groupId>
>                         <artifactId>camel-jms</artifactId>
>                         <version>${camelversion}</version>
>                 </dependency>
>
>                 <dependency>
>                         <groupId>org.apache.activemq</groupId>
>                         <artifactId>activemq-camel</artifactId>
>                         <version>5.6.0</version>
>                 </dependency>
>
> When i install my bundle in fuse a lot of extra bundles are installed. I dun
> know why? Also my bundle is not get started.
>
>
> Please help and suggest what am i doing wrong. What am i missing?
>
> I dun wana run active mq separately, i want to use embedded activemq of
> apapche camel.
>
> Please help!!!
>
> Regards,
> Komal
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Hi-I-wanna-use-camel-s-embedded-in-active-mq-tp5751012.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Re: Hi I wanna use camel 's embedded in active mq

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

For questions about JBoss Fuse, then please use their user forum for that
http://community.jboss.org/en/jbossfuse

And the product comes with a number of quicstarts out of the box you
can take a look at.
For example there is a jms quickstart in JBoss Fuse 6.1, that uses
Camel and AMQ.

On Fri, May 23, 2014 at 2:01 PM, komal bhola <ko...@gmail.com> wrote:
> Hi Claus,
>
> Thanks for the reply. I have successfully started activemq embedded in
> jboss-fuse.
> Now from my application which is camel based I want to send receive messages
> to that queue.
>
> For the same I have coded which I mentioned in my 1st post. When I install
> my application a lot of jasper, glassfish, etc bundles get downloaded.
>
> Also please guide me for sending messages to queue. As above written code of
> mine is not working. As i am using blueprint as a container. I find very
> less example online. Please guide..
>
> Thanks
> Komal
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Hi-I-wanna-use-camel-s-embedded-in-active-mq-tp5751012p5751529.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Hi I wanna use camel 's embedded in active mq

Posted by komal bhola <ko...@gmail.com>.
Hi Claus,

Thanks for the reply. I have successfully started activemq embedded in
jboss-fuse. 
Now from my application which is camel based I want to send receive messages
to that queue. 

For the same I have coded which I mentioned in my 1st post. When I install
my application a lot of jasper, glassfish, etc bundles get downloaded. 

Also please guide me for sending messages to queue. As above written code of
mine is not working. As i am using blueprint as a container. I find very
less example online. Please guide..

Thanks 
Komal



--
View this message in context: http://camel.465427.n5.nabble.com/Hi-I-wanna-use-camel-s-embedded-in-active-mq-tp5751012p5751529.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Hi I wanna use camel 's embedded in active mq

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

If you use Fuse ESB / JBoss Fuse then it comes with embedded AMQ out of the box.
For that you need to use the medium or full distro.

For the maven dependency you must make sure to use the same Camel and
AMQ version as that comes shipped out of the box with Fuse ESB. You
should not use the very old ActiveMQ 5.6.0 version.

Make sure this brokerURL is using the name of the broker that comes
out of the box in Fuse ESB

  <property name="brokerURL" value="vm://myBroker" />


You can type activemq:list in the shell of Fuse ESB to see the name of
the broker.

And as this is a Fuse ESB / JBoss Fuse question you should ask on
their user forum, and NOT here on Apache Camel.

There is a link to that user forum from this page
http://www.jboss.org/products/fuse

On Mon, May 12, 2014 at 9:24 AM, komal bhola <ko...@gmail.com> wrote:
> Hi ,
>
> I have implemented camel with blueprint implementation.
> Please provide some guide or tutorial. All i find are spring tutorials.
>
> My Code is as follows:
>
> Camel Context :
>         <route id="activeMQ">
>                 <from uri="direct:activeMQ" />
>
>                 <setExchangePattern pattern="InOnly" />
>
>                 <to uri="jms:queue:test?requestTimeout=75000" />
>         </route>
>
>         <route>
>                 <from uri="jms:queue:test" />
>                 <bean ref="serviceProcessor" method="activeMQTesting"/>
>         </route>
>
>
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                                 <property name="configuration" ref="jmsConfig" />
>                  </bean>
>
> <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>                                 <property name="connectionFactory" ref="pooledConnectionFactory"/>
>                                 <property name="concurrentConsumers" value="10"/>
>                                 <property name="transacted" value="true"/>
>                         </bean>
>
> <bean id="pooledConnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="maxConnections" value="8" />
>
>     <property name="connectionFactory" ref="jmsConnectionFactory" />
>   </bean>
>
>
>   <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
>     <property name="brokerURL" value="vm://myBroker" />
>     <property name="userName" value="admin"/>
>     <property name="password" value="admin"/>
>
>   </bean>
>
>
> In between my transactions i want to send data to queue asynchronously.
> Using other route i want to read messages from queue and process.
>
> My Pom.xml:
>
>
>
>         <dependency>
>                         <groupId>org.apache.camel</groupId>
>                         <artifactId>camel-jms</artifactId>
>                         <version>${camelversion}</version>
>                 </dependency>
>
>                 <dependency>
>                         <groupId>org.apache.activemq</groupId>
>                         <artifactId>activemq-camel</artifactId>
>                         <version>5.6.0</version>
>                 </dependency>
>
> When i install my bundle in fuse a lot of extra bundles are installed. I dun
> know why? Also my bundle is not get started.
>
>
> Please help and suggest what am i doing wrong. What am i missing?
>
> I dun wana run active mq separately, i want to use embedded activemq of
> apapche camel.
>
> Please help!!!
>
> Regards,
> Komal
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Hi-I-wanna-use-camel-s-embedded-in-active-mq-tp5751012.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/