A client should connect to the same broker for it's sending and receiving so that the broker does the forwarding

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@636064 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2008-03-11 19:11:51 +00:00
parent 67d38fafd1
commit 4fcacf7772
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class NetworkLoadTest extends TestCase {
private final Connection fromConnection; private final Connection fromConnection;
public ForwardingClient(int from, int to) throws JMSException { public ForwardingClient(int from, int to) throws JMSException {
toConnection = createConnection(to); toConnection = createConnection(from);
Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to)); final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);