org.mule.transport.amqp.internal.endpoint.dispatcher.DispatcherActionDispatch.java Source code

Java tutorial

Introduction

Here is the source code for org.mule.transport.amqp.internal.endpoint.dispatcher.DispatcherActionDispatch.java

Source

/*
 * Copyright (c) MuleSoft, Inc.  All rights reserved.  https://github.com/mulesoft/mule-transport-amqp
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */
package org.mule.transport.amqp.internal.endpoint.dispatcher;

import com.rabbitmq.client.Channel;
import org.mule.transport.amqp.internal.connector.AmqpConnector;
import org.mule.transport.amqp.internal.domain.AmqpMessage;

import java.io.IOException;

public class DispatcherActionDispatch extends DispatcherAction {
    public AmqpMessage run(final AmqpConnector amqpConnector, final Channel channel, final String exchange,
            final String routingKey, final AmqpMessage amqpMessage, final long timeout) throws IOException {
        channel.basicPublish(exchange, routingKey, amqpConnector.isMandatory(), amqpConnector.isImmediate(),
                amqpMessage.getProperties(), amqpMessage.getBody());

        return null;
    }
}