public class AmqpPublishConsume extends Object
AmqpMessage to a given exchange| Constructor and Description |
|---|
AmqpPublishConsume() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AmqpAttributes> |
publishConsume(AmqpConfig config,
AmqpTransactionalConnection connection,
String exchangeName,
String contentType,
String encoding,
ExchangeDefinition fallbackExchangeDefinition,
String routingKey,
DeliveryMode deliveryMode,
Long maximumWait,
TimeUnit maximumWaitUnit,
AmqpMessageBuilder messageBuilder,
AmqpPublishParameters overrides,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction,
org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId,
boolean createFallbackExchange,
org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo)
Operation that allows the user to send a message to a AMQP Exchange and waits for a response either to the provided replyTo
destination or to a temporary destination created dynamically
|
@OutputResolver(output=AmqpOutputResolver.class) @Throws(value=AmqpPublishConsumeErrorTypeProvider.class) @MediaType(value="*/*", strict=false) public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AmqpAttributes> publishConsume(@Config AmqpConfig config, @Connection AmqpTransactionalConnection connection, @Summary(value="The name of the exchange to publish the message to") String exchangeName, @Optional @Summary(value="The content type of the message body") @Example(value="application/json") String contentType, @Optional @Summary(value="The encoding of the message body") @Example(value="UTF-8") String encoding, @Optional @Summary(value="The queue exchange to use for exchange declaration in case there is no exchange with the exchangeName") @Expression(value=NOT_SUPPORTED) ExchangeDefinition fallbackExchangeDefinition, @Optional @Summary(value="The routing key to publish to") String routingKey, @ConfigOverride @Optional @Summary(value="The delivery mode to use when publishing to the AMQP broker") DeliveryMode deliveryMode, @Optional(defaultValue="10000") @Summary(value="Maximum time to wait for a message to arrive before timeout") Long maximumWait, @Optional(defaultValue="MILLISECONDS") @Example(value="MILLISECONDS") @Summary(value="Time unit to be used in the maximumWaitTime configuration") TimeUnit maximumWaitUnit, @Summary(value="A builder for the message that will be published") @ParameterGroup(name="Message",showInDsl=true) AmqpMessageBuilder messageBuilder, @ParameterGroup(name="Publish Configuration") AmqpPublishParameters overrides, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction, @ConfigOverride org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId, @ConfigOverride boolean createFallbackExchange, org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo) throws AmqpExtensionException
config - the current AmqpConfigconnection - the current AmqpConnectionexchangeName - The name of the exchange to publish the message tocontentType - The content type of the message bodyencoding - The encoding of the message bodyfallbackExchangeDefinition - The queue exchange to use for exchange declaration in case there is no exchange with the
exchangeNameroutingKey - The routing key to publish todeliveryMode - The delivery mode to use when publishing to the AMQP brokermaximumWait - The maximum time to wait for a message to arrive before timeoutmaximumWaitUnit - The time unit to be used in the maximumWaitTime configurationmessageBuilder - the AmqpMessageBuilder used to create the Message to be sentoverrides - the configuration overridestransactionalAction - information of the current transaction in case it existssendCorrelationId - options on whether to include an outbound correlation id or notcorrelationInfo - the current message's correlation infoResult with the reply AmqpMessage content as Result.getOutput() and its properties and headers as
Result.getAttributes()AmqpExtensionException - if an error occursCopyright © 2019 MuleSoft, Inc.. All rights reserved.