mirror of https://github.com/apache/activemq.git
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:
parent
67d38fafd1
commit
4fcacf7772
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue