Hello -

I am having an issue when using the Java proton messenger with dispatch router. 
  Most assuredly is probably my doing but figured I’d ask.   I have small 
network of routers, publishers and consumers setup.   There two routers 
interconnected with a java proton based messenger publishing and a java proton 
based messenger receiving.    When I send a message, the producer hangs after 
sending the message and stopping messenger.  The dispatch router hasn’t 
received the message and when I kill the producer the dispatcher throws a SASL 
mismatch exception.  When I do the same thing with the C or Python messenger 
implementations all is well; no exception and my consumer successfully receives 
the message.   Also, when I eliminate dispatcher and do a point to point 
message it works as well.  Also, eliminating the one of the routers 
(standalone) has no effect as well.

Jack

Router config…

container {

    worker-threads: 4

    container-name: Qpid.Dispatch.Router.router1

}


ssl-profile {

    name: ssl-profile-name

}


listener {

    addr: 0.0.0.0

    port: amqp

    sasl-mechanisms: ANONYMOUS

    max-frame-size: 16384

}


listener {

    role: inter-router

    addr: 0.0.0.0

    port: 20005

    sasl-mechanisms: ANONYMOUS

}


connector {

    label: Router Uplink

    role: inter-router

    addr: 10.65.216.15

    port: 20005

    sasl-mechanisms: ANONYMOUS

}


router {

    mode: interior

    router-id: QDR.router1

}


fixed-address {

    prefix: /closest/

    fanout: single

    bias: closest

}


fixed-address {

    prefix: /multicast/

    fanout: multiple

}


fixed-address {

    prefix: /queue/

    phase:  0

    fanout: single

    bias:   closest

}


fixed-address {

    prefix: /queue/

    phase:  1

    fanout: single

    bias:   closest

}


fixed-address {

    prefix: /

    fanout: multiple

}


Simple send example…

public class Send {


private static Logger tracer = Logger.getLogger("proton.example");

private String address = "amqp://router1/queue/my-address";

private String subject;

private String[] bodies;


private static void usage() {

System.err.println("Usage: send [-a ADDRESS] [-s SUBJECT] MSG+");

System.exit(2);

}


private Send(String args[]) {

int i = 0;

String arg = args[i++];

if (arg.startsWith("-")) {

if ("-a".equals(arg)) {

address = args[i++];

} else if ("-s".equals(arg)) {

subject = args[i++];

} else {

System.err.println("unknown option " + arg);

usage();

}

}

bodies = Arrays.copyOfRange(args, i, args.length);

}


private void send() {

try {

Messenger mng = new MessengerImpl();

mng.start();

Message msg = new MessageImpl();

msg.setAddress(address);

msg.setBody(new AmqpValue("Hello Bob"));

mng.put(msg);


mng. send();

Thread.sleep(10);

mng.stop();

} catch (Exception e) {

tracer.log(Level.SEVERE, "proton error", e);

}

}


public static void main(String args[]) {

Send o = new Send(args);

o.send();

}

}

Reply via email to