Results 1 to 2 of 2

Thread: Can we use JmsAdapters for messaging to remote systems

Hybrid View

  1. #1

    Red face Can we use JmsAdapters for messaging to remote systems

    Hi

    I am trying to send a message using Jmsadapters from one pc to other

    in this manner

    PC1
    ====

    <jms-source channel="inChannel"
    connection-factory="connectionFactory" destination="inQueue" />

    <jms-target channel="inChannel"
    connection-factory="connectionFactory" destination="inQueue" />

    <beans:bean id="connectionFactory"
    class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <beansroperty name="brokerURL" value="tcp://localhost:61616" />
    </beans:bean>

    <beans:bean id="inQueue"
    class="org.apache.activemq.command.ActiveMQQueue">
    <beans:constructor-arg index="0" value="sample.queue" />
    </beans:bean>



    PC2
    ====

    <jms-source channel="inChannel"
    connection-factory="connectionFactory"
    destination="inQueue"/>

    <jms-target channel="inChannel"
    connection-factory="connectionFactory"
    destination="inQueue" />

    <beans:bean id="connectionFactory"
    class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <beansroperty name="brokerURL" value="tcp://localhost:61616" />
    </beans:bean>

    <beans:bean id="inQueue"
    class="org.apache.activemq.command.ActiveMQQueue">
    <beans:constructor-arg index="0" value="sample.queue"/>
    </beans:bean>



    and sending message from PC1 using inChannel.send and in PC2 i am trying to receive message using inChannel.receive()

    but not working please help me in this

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    Try removing the <jms-source/> from PC1's configuration and removing the <jms-target/> from PC2's configuration. When you send on PC1 it in turn sends to the JMS Target. When you receive on PC2, you will be receiving any Messages that have been received by the JMS Source.

    Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •