[rabbitmq-discuss] Polling message from RabbitMQ by servicemix.

aznmedia digz6666 at gmail.com
Fri Dec 5 08:13:17 GMT 2008


Hello there.
I'd like to poll message from RabbitMQ queue by servicemix.

Here's xbean.xml file for the servicemix-jms binding component SU consume
(poll) messages from ibm websphere message queue.
[code]

<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>

[/code]

I'm writing my xbean.xml file for the RabbitMQ message queue like following
but I don't know how to write.
So following xbean.xml file is a draft:

[code]
<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">

       <!---DEFINE ENDPOINT HERE--->

	<bean id="connectionFactory" class="com.rabbitmq.client.ConnectionFactory">
		<property name="hostName" value="localhost" />
		<property name="portNumber" value="AMQP.PROTOCOL.PORT" />
	</bean>
</beans>
[/code]

What should I write following:
1. xmlns:foo="http://mycompany.com/foo"
2. MyMQService
3. TARGET_SERVICE_NAME_GOES_HERE
4. TARGET_ENDPOINT_GOES_HERE
Maybe some of them are not required or not exists for rabbitMQ.

I've got many questions:
1. Is there any channel name in rabbitMQ?
2. Is there any queue manager in rabbitMQ?
3. What is a realm in rabbitMQ? (r_ticket =
r_channel.accessRequest(r_realm))
4. What is a ticket in rabbitMQ? (r_channel.queueDeclare(r_ticket,
r_queueName))
5. What is a exchange in rabbitMQ? (r_channel.basicPublish(r_ticket,
r_exchange, r_queueName, r_basicProperties, r_msg.getBytes()))
-- 
View this message in context: http://www.nabble.com/Polling-message-from-RabbitMQ-by-servicemix.-tp20849425p20849425.html
Sent from the RabbitMQ mailing list archive at Nabble.com.





More information about the rabbitmq-discuss mailing list