public class MQOperations extends Object implements org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
| Constructor and Description |
|---|
MQOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(String ackId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
Allows the user to perform an ACK when the
AckMode.MANUAL mode is elected while consuming the Message. |
void |
consume(IBMMQConfiguration config,
org.mule.jms.commons.internal.connection.JmsTransactionalConnection connection,
String destination,
MQConsumerType consumerType,
ConsumerAckMode ackMode,
String selector,
MediaTypeOverridingParameters mediaTypeOverriding,
Long maximumWait,
TimeUnit maximumWaitUnit,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Object,Object> completionCallback)
Operation that allows the user to consume a single
Message from a given Destination. |
void |
dispose() |
void |
initialise() |
void |
publish(IBMMQConfiguration config,
org.mule.jms.commons.internal.connection.JmsTransactionalConnection connection,
String destination,
MQDestinationType destinationType,
MQMessageBuilder messageBuilder,
org.mule.jms.commons.internal.publish.JmsPublishParameters overrides,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction,
org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId,
org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
Operation that allows the user to send a
Message to a JMS Destination |
void |
publishConsume(IBMMQConfiguration config,
org.mule.jms.commons.internal.connection.JmsConnection connection,
String destination,
MQMessageBuilder messageBuilder,
org.mule.jms.commons.internal.publish.JmsPublishParameters publishParameters,
MQConsumeParameters consumeParameters,
RequestReplyPattern requestReplyPattern,
org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId,
org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Object,Object> completionCallback)
Operation that allows the user to send a message to a JMS
Destination and waits for a response either to the provided
ReplyTo destination or to a temporary Destination created dynamically |
void |
recoverSession(String ackId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
Allows the user to perform a session recover when the
AckMode.MANUAL mode is elected while consuming the
Message. |
public void initialise()
initialise in interface org.mule.runtime.api.lifecycle.Initialisablepublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposable@OutputResolver(output=AnyOutputResolver.class, attributes=MQAttributesOutputResolver.class) @Throws(value=org.mule.jms.commons.api.exception.JmsConsumeErrorTypeProvider.class) @Execution(value=BLOCKING) public void consume(@Config IBMMQConfiguration config, @Connection org.mule.jms.commons.internal.connection.JmsTransactionalConnection connection, @Summary(value="The name of the Destination from where the Message should be consumed") String destination, @ConfigOverride @Expression(value=NOT_SUPPORTED) @Summary(value="The Type of the Consumer that should be used for the provided destination") MQConsumerType consumerType, @Optional @Summary(value="The Session ACK mode to use when consuming a message") ConsumerAckMode ackMode, @ConfigOverride @Summary(value="The JMS selector to be used for filtering incoming messages") String selector, @Placement(tab="Advanced") @ParameterGroup(name="MediaType Override") MediaTypeOverridingParameters mediaTypeOverriding, @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, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Object,Object> completionCallback)
Message from a given Destination.connection - the current JmsConnectionconfig - the current IBMMQConfigurationdestination - the name of the Destination from where the Message should be consumedconsumerType - the type of the MessageConsumer that is required for the given destination, along with any extra
configurations that are required based on the destination type.ackMode - the ConsumerAckMode that will be configured over the Message and Sessionselector - a custom JMS selector for filtering the messagesmaximumWait - maximum time to wait for a message before timing outmaximumWaitUnit - Time unit to be used in the maximumWaitTime configurations@Throws(value=org.mule.jms.commons.api.exception.JmsPublisherErrorTypeProvider.class)
@Execution(value=BLOCKING)
public void publish(@Config
IBMMQConfiguration config,
@Connection
org.mule.jms.commons.internal.connection.JmsTransactionalConnection connection,
@Summary(value="The name of the Destination where the Message should be sent")
String destination,
@Optional(defaultValue="QUEUE") @Summary(value="The type of the Destination")
MQDestinationType destinationType,
@Summary(value="A builder for the message that will be published") @ParameterGroup(name="Message",showInDsl=true)
MQMessageBuilder messageBuilder,
@ParameterGroup(name="Publish Configuration")
org.mule.jms.commons.internal.publish.JmsPublishParameters overrides,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction,
@ConfigOverride
org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId,
org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
Message to a JMS Destinationconfig - the current IBMMQConfigurationconnection - the current JmsConnectiondestination - the name of the Destination where the Message should be sentdestinationType - the MQDestinationType of the destinationmessageBuilder - the MQMessageBuilder used to create the Message to be sentoverrides - Parameter Group with overriding parameters from the configurationtransactionalAction - Transactional Action for the operation. Indicates if the publish must be executed or not in a
transaction.sendCorrelationId - options on whether to include an outbound correlation id or notcorrelationInfo - the current message's correlation info@OutputResolver(output=AnyOutputResolver.class, attributes=MQAttributesOutputResolver.class) @Throws(value=org.mule.jms.commons.api.exception.JmsPublishConsumeErrorTypeProvider.class) @Execution(value=BLOCKING) public void publishConsume(@Config IBMMQConfiguration config, @Connection org.mule.jms.commons.internal.connection.JmsConnection connection, @Placement(order=0) @Summary(value="The name of the Queue destination where the Message should be sent") String destination, @Placement(order=1) @Summary(value="A builder for the message that will be published") @ParameterGroup(name="Message",showInDsl=true) MQMessageBuilder messageBuilder, @Placement(order=2) @ParameterGroup(name="Publish Configuration",showInDsl=true) org.mule.jms.commons.internal.publish.JmsPublishParameters publishParameters, @Placement(order=3) @ParameterGroup(name="Consume Configuration",showInDsl=true) MQConsumeParameters consumeParameters, @Optional(defaultValue="CORRELATION_ID") @DisplayName(value="Request-Reply Pattern") RequestReplyPattern requestReplyPattern, @ConfigOverride @DisplayName(value="Send Correlation ID") org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId, org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Object,Object> completionCallback)
Destination and waits for a response either to the provided
ReplyTo destination or to a temporary Destination created dynamicallyconfig - the current IBMMQConfigurationconnection - the current JmsConnectiondestination - the name of the Destination where the Message should be sentmessageBuilder - the MQMessageBuilder used to create the Message to be sentpublishParameters - Parameter group that lets override the publish configurationconsumeParameters - Parameter group that lets override the consume configurationsendCorrelationId - options on whether to include an outbound correlation id or notcorrelationInfo - the current message's correlation info@Throws(value=org.mule.jms.commons.api.exception.JmsAckErrorTypeProvider.class)
public void ack(@Summary(value="The AckId of the Message to ACK")
String ackId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
AckMode.MANUAL mode is elected while consuming the Message. As per
JMS Spec, performing an ACK over a single Message automatically works as an ACK for all the Messages produced
in the same JmsSession.ackId - The AckId of the Message to ACKorg.mule.jms.commons.api.exception.JmsAckException - if the JmsSession or JmsConnection were closed, or if the ID doesn't belong to a
session of the current connection@Throws(value=org.mule.jms.commons.api.exception.JmsSessionRecoverErrorTypeProvider.class) public void recoverSession(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
AckMode.MANUAL mode is elected while consuming the
Message. As per JMS Spec, performing a session recover automatically will redeliver all the consumed messages that
had not being acknowledged before this recover.ackId - The AckId of the Message Session to recoverCopyright © 2025 MuleSoft, Inc.. All rights reserved.