Package org.axonframework.commandhandling.distributed

Examples of org.axonframework.commandhandling.distributed.CommandDispatchException


    public <R> void send(String routingKey, CommandMessage<?> commandMessage, CommandCallback<R> callback)
            throws Exception {
        Assert.isTrue(awaitJoined(5, TimeUnit.SECONDS), "This Connector did not properly join the Cluster yet.");
        String destination = consistentHash.getMember(routingKey, commandMessage.getPayloadType().getName());
        if (destination == null) {
            throw new CommandDispatchException("No node known to accept " + commandMessage.getPayloadType().getName());
        }
        Address dest = getAddress(destination);
        callbacks.put(commandMessage.getIdentifier(), new MemberAwareCommandCallback<R>(dest, callback));
        channel.send(dest, new DispatchMessage(commandMessage, serializer, true));
    }
View Full Code Here


    @Override
    public void send(String routingKey, CommandMessage<?> commandMessage) throws Exception {
        Assert.isTrue(awaitJoined(5, TimeUnit.SECONDS), "This Connector did not properly join the Cluster yet.");
        String destination = consistentHash.getMember(routingKey, commandMessage.getPayloadType().getName());
        if (destination == null) {
            throw new CommandDispatchException("No node known to accept " + commandMessage.getPayloadType().getName());
        }
        Address dest = getAddress(destination);
        channel.send(dest, new DispatchMessage(commandMessage, serializer, false));
    }
View Full Code Here

TOP

Related Classes of org.axonframework.commandhandling.distributed.CommandDispatchException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.