public void queue(InterHubMessage message) {
if (message.getDelivery() == Stateful) {
initializer.onStatefulMessage(message);
}
if (message instanceof Routable) {
Routable routableMessage = (Routable) message;
getChannel(routableMessage.getChannel()).dispatch(message);
} else if (message.getDelivery() == Stateful || message.getDelivery() == InterHubMessage.Delivery.AllHandlers) {
for (MultiEndPointQueue queue : channels.values()) {
queue.dispatch(message);
}
} else {