[jboss-user] [JBoss Messaging] New message: "Problem in message flow in a bridge with two nodes of Jboss"

Sridevi KA do-not-reply at jboss.com
Wed Mar 10 04:44:22 EST 2010

User development,

A new message was posted in the thread "Problem in message flow in a bridge with two nodes of Jboss":


Author  : Sridevi KA
Profile : http://community.jboss.org/people/sri1083

Hi ...
  I am trying to bridge two nodes of JBOSS deployed on same machine.
Target Node :
<?xml version="1.0" encoding="UTF-8"?>
     Example deployment descriptor for a message bridge
     $Id: messaging-secure-socket-service.xml 2737 2007-05-29 17:56:49Z timfox $

   <mbean code="org.jboss.jms.server.bridge.BridgeService"
      <!-- The JMS provider loader that is used to lookup the source destination -->   
      <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=MyRemoteJMSProvider,server=remotehost</depends>     
      <!-- The JMS provider loader that is used to lookup the target destination -->
      <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>    
      <!-- The JNDI lookup for the source destination -->
      <attribute name="SourceDestinationLookup">/queue/quickstart_helloworld_Request_esb</attribute> 
      <!-- The JNDI lookup for the target destination -->
      <attribute name="TargetDestinationLookup">/queue/quickstart_helloworld_Request_esb</attribute>
      <!-- The username to use for the source connection 
      <attribute name="SourceUsername">bob</attribute>
      <!-- The password to use for the source connection
      <attribute name="SourcePassword">cheesecake</attribute>
      <!-- The username to use for the target connection
      <attribute name="TargetUsername">mary</attribute>
      <!-- The password to use for the target connection
      <attribute name="TargetPassword">hotdog</attribute>
      <!-- Optional: The Quality Of Service mode to use, one of:
           QOS_AT_MOST_ONCE = 0;
           QOS_DUPLICATES_OK = 1;
           QOS_ONCE_AND_ONLY_ONCE = 2; -->
      <attribute name="QualityOfServiceMode">0</attribute>
      <!-- JMS selector to use for consuming messages from the source
      <attribute name="Selector">specify jms selector here</attribute>
      <!-- The maximum number of messages to consume from the source before sending to the target -->
      <attribute name="MaxBatchSize">5</attribute>     
      <!-- The maximum time to wait (in ms) before sending a batch to the target even if MaxBatchSize is not exceeded.
           -1 means wait forever -->   
      <attribute name="MaxBatchTime">-1</attribute>
      <!-- If consuming from a durable subscription this is the subscription name
      <attribute name="SubName">mysub</attribute>
      <!-- If consuming from a durable subscription this is the client ID to use
      <attribute name="ClientID">myClientID</attribute>
      <!-- The number of ms to wait between connection retrues in the event connections to source or target fail -->
      <attribute name="FailureRetryInterval">5000</attribute>      
      <!-- The maximum number of connection retries to make in case of failure, before giving up
           -1 means try forever-->
      <attribute name="MaxRetries">-1</attribute>
      <!-- If true then the message id of the message before bridging will be added as a header to the message so it is available
           to the receiver. Can then be sent as correlation id to correlate in a distributed request-response -->
      <attribute name="AddMessageIDInHeader">false</attribute>
<!-- Remote JMS Provider -->
 <attribute name="ProviderName">RemoteXAConnectionFactory</attribute>
 <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
 <!-- The combined connection factory -->
 <attribute name="FactoryRef">XAConnectionFactory</attribute>
 <!-- The queue connection factory -->
 <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
 <!-- The topic factory -->
 <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
 <attribute name="Properties">
i have deployed helloworld example of ESB.The ESB is listening to queue.
<?xml version = "1.0" encoding = "UTF-8"?>
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-bus busid="quickstartEsbChannel">
description="Hello World">
<jms-listener name="JMS-Gateway"
<jms-listener name="helloWorld"
<actions mep="OneWay">
<action name="action1"
<action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="printfull" value="true"/>
<!-- The next action is for Continuous Integration testing -->
<action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
I send messages to the source node but the ESB which is listening is not receiving the messages.
Client code for sending message
 * JBoss, Home of Professional Open Source
 * Copyright 2006, JBoss Inc., and others contributors as indicated 
 * by the @authors tag. All rights reserved. 
 * See the copyright.txt in the distribution for a
 * full listing of individual contributors. 
 * This copyrighted material is made available to anyone wishing to use,
 * modify, copy, or redistribute it subject to the terms and conditions
 * of the GNU Lesser General Public License, v. 2.1.
 * This program is distributed in the hope that it will be useful, but WITHOUT A 
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
 * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License,
 * v.2.1 along with this distribution; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
 * MA  02110-1301, USA.
 * (C) 2005-2006,
 * @author JBoss Inc.
package org.jboss.soa.esb.samples.quickstart.helloworld.test;
import java.util.Properties;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class SendJMSMessage {
    QueueConnection conn;
    QueueSession session;
    Queue que;
    public void setupConnection() throws JMSException, NamingException
        Properties properties1 = new Properties();
  properties1.put(Context.PROVIDER_URL, "jnp://");
  InitialContext iniCtx = new InitialContext(properties1);
     Object tmp = iniCtx.lookup("ConnectionFactory");
     QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
     conn = qcf.createQueueConnection();
     que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request_esb");
     session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
     System.out.println("Connection Started");
    public void stop() throws JMSException 
    public void sendAMessage(String msg) throws JMSException {
        QueueSender send = session.createSender(que);        
        ObjectMessage tm = session.createObjectMessage(msg);
    public static void main(String args[]) throws Exception
     SendJMSMessage sm = new SendJMSMessage();
Please help on this.I dont know whether this is problem with ESB or message bridging.


To reply to this message visit the message page: http://community.jboss.org/message/531001#531001

More information about the jboss-user mailing list