lhein wrote:
> 
> I think these properties are variables in the
> com.ibm.mq.jms.MQQueueConnectionFactory class.
> You need to check what properties you got in your factory.
> 
> Regards
> Lars
> 
> 
> 2008/12/4 aznmedia <[email protected]>
> 
>>
>>
>> lhein wrote:
>> >
>> > Hi,
>> >
>> > have a look at the FAQ:
>> >
>> >
>> http://servicemix.apache.org/how-do-i-integrate-the-servicemix-jms-component-with-webspheremq.html
>> >
>> > It's actually a description how to connect to IBM Websphere MQ but you
>> can
>> > easily adapt it to work with your
>> > MQ software as well.
>> >
>> > Regards
>> > Lars
>> >
>> >
>> > 2008/11/26 aznmedia <[email protected]>
>> >
>> >>
>> >> Hello there.
>> >> I'm fresh to servicemix.
>> >>
>> >> Is there any way to poll message and push message to rabbitMQ broker
>> by
>> >> servicemix?
>> >> What servicemix component I should use?
>> >>
>> >> Cheers,
>> >> MethoD
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Woking-with-rabbitMQ-by-servicemix-tp20695012p20695012.html
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > http://lhein.blogspot.com
>> >
>> >
>> > -----
>> > Regards
>> > Lars
>> >
>> >
>> > http://lhein.blogspot.com
>> >
>> >
>>
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
>>       xmlns:foo="http://mycompany.com/foo";
>>       xmlns:util="http://www.springframework.org/schema/util";>
>>
>>  <jms:endpoint service="foo:MyMQService"
>>    endpoint="mq"
>>    targetService="foo:TARGET_SERVICE_NAME_GOES_HERE"
>>    targetEndpoint="TARGET_ENDPOINT_GOES_HERE"
>>    role="consumer"
>>    destinationStyle="queue"
>>    jmsProviderDestinationName="QUEUE_NAME_GOES_HERE"
>>    connectionFactory="#mqConnectionFactory"
>>    defaultMep="http://www.w3.org/2004/08/wsdl/in-only"; />
>>
>>
>>  <bean id="mqConnectionFactory"
>> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>>    <property name="transportType">
>>      <util:constant
>> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>>    </property>
>>    <property name="queueManager" value="QMGR_NAME_GOES_HERE" />
>>    <property name="hostName" value="HOST_ADDRESS_GOES_HERE" />
>>    <property name="channel" value="QMGR_CHANNEL_NAME_GOES_HERE" />
>>    <property name="port" value="PORT_NUMBER_GOES_HERE" />
>>  </bean>
>>
>> </beans>
>>
>> It seems like requires queueManager name and channel name.
>> But there's no queueManager and channel name in RabbitMQ.
>>
>> Is it possible to remove these properties?
>>
>> Here's the example code that sends message to rabbitmq given queue.
>>
>> // connection objects
>> ConnectionFactory r_connectionFactory;
>> Connection r_connection;
>> Channel r_channel;
>>
>> // connection paramateres
>> String r_hostName = "localhost";
>> int r_portNumber = AMQP.PROTOCOL.PORT;
>> String r_realm = "/data";
>> int r_ticket;
>> String r_exchange = "";
>> String r_routingKey = "jms-rabbit"; // queue name
>>
>> // connect to broker
>> try {
>>        r_connectionFactory = new ConnectionFactory();
>>        r_connection = r_connectionFactory.newConnection(r_hostName,
>>        r_portNumber);
>>        r_channel = r_connection.createChannel();
>>        r_ticket = r_channel.accessRequest(r_realm);
>>        r_channel.queueDeclare(r_ticket, r_routingKey);
>> } catch (Exception e) {
>>        e.printStackTrace();
>> }
>>
>> // send message to queue
>> try {
>>        String msg = "Hello RabbitMQ!";
>>        BasicProperties props = null;
>>        r_channel.basicPublish(r_ticket, r_exchange, r_routingKey, props,
>> msg);
>> } catch(Exception e) {
>>        e.printStackTrace();
>> }
>> --
>> View this message in context:
>> http://www.nabble.com/Woking-with-rabbitMQ-by-servicemix-tp20695012p20830063.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://lhein.blogspot.com
> 
> 
> -----
> Regards 
> Lars 
> 
> 
> http://lhein.blogspot.com 
> 
> 

I'm writing my xbean.xml file like following:
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<beans xmlns:jee="http://www.springframework.org/schema/jee";
       xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://servicemix.apache.org/jms/1.0
http://servicemix.apache.org/schema/servicemix-jms-3.2.2.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>

        <jms:consumer service="my:ConsumerService"
                endpoint="mq"
                destinationName="rabbit-queue"
                connectionFactory="#connectionFactory"
                concurrentConsumers="8" />


        <bean id="connectionFactory" 
class="com.rabbitmq.client.ConnectionFactory">
                <constructor-arg>
                        <bean id="params" 
class="com.rabbitmq.client.ConnectionParameters" >
                                <property name="_userName">guest</property>
                                <property name="_password">guest</property>
                                <property name="_virtualHost">/</property>
                        </bean>
                </constructor-arg>
                <property name="hostName" value="localhost" />
                <property name="portNumber">
                        <util:constant static-field="AMQP.PROTOCOL.PORT" />
        </property>
        </bean>
</beans>

And I don't understand highlighted statement.

What is my:ConsumerService?
What should I write there?
-- 
View this message in context: 
http://www.nabble.com/Woking-with-rabbitMQ-by-servicemix-tp20695012p20989778.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to