Class AnypointMQSource
java.lang.Object
org.mule.runtime.extension.api.runtime.source.Source<InputStream,AnypointMQMessageAttributes>
com.mulesoft.extension.mq.internal.source.AnypointMQSource
- All Implemented Interfaces:
org.mule.runtime.extension.api.runtime.connectivity.Reconnectable
@Alias("subscriber")
@MediaType(value="*/*",
strict=false)
@Throws(AnypointMQSubscriberErrorTypeProvider.class)
public class AnypointMQSource
extends org.mule.runtime.extension.api.runtime.source.Source<InputStream,AnypointMQMessageAttributes>
implements org.mule.runtime.extension.api.runtime.connectivity.Reconnectable
Anypoint MQ Subscriber Message Source, retrieves messages from the given destination name.
- Since:
- 2.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonError(org.mule.runtime.api.message.Error error, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) voidonStart(org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream, AnypointMQMessageAttributes> callback) voidonStop()voidonSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) voidreconnect(org.mule.runtime.api.connection.ConnectionException exception, org.mule.runtime.extension.api.runtime.connectivity.ReconnectionCallback reconnectionCallback) Participates in the runtime's per-source reconnection contract.
-
Field Details
-
ACK_MODE_CTX_VAR
- See Also:
-
DESTINATION_CTX_VAR
- See Also:
-
MESSAGE_CTX_VAR
- See Also:
-
-
Constructor Details
-
AnypointMQSource
public AnypointMQSource()
-
-
Method Details
-
onStart
public void onStart(org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream, AnypointMQMessageAttributes> callback) throws org.mule.runtime.api.connection.ConnectionException- Specified by:
onStartin classorg.mule.runtime.extension.api.runtime.source.Source<InputStream,AnypointMQMessageAttributes> - Throws:
org.mule.runtime.api.connection.ConnectionException
-
reconnect
public void reconnect(org.mule.runtime.api.connection.ConnectionException exception, org.mule.runtime.extension.api.runtime.connectivity.ReconnectionCallback reconnectionCallback) Participates in the runtime's per-source reconnection contract. Without this the runtime has no reconnection action for the subscriber (SdkReconnectableAdapter returns empty), so on a sustained connectivity loss it falls back to a generic stop+start that can leave consumption permanently stopped until the app is restarted â the failure seen in the May 7 us-east-1 incident (W-22472649).Tears the current subscriber down and rebuilds it against a freshly resolved destination. On success the runtime resumes delivery; on failure it applies the configured reconnection strategy.
- Specified by:
reconnectin interfaceorg.mule.runtime.extension.api.runtime.connectivity.Reconnectable
-
onStop
public void onStop()- Specified by:
onStopin classorg.mule.runtime.extension.api.runtime.source.Source<InputStream,AnypointMQMessageAttributes>
-
onSuccess
@OnSuccess public void onSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) throws Exception - Throws:
Exception
-
onError
@OnError public void onError(org.mule.runtime.api.message.Error error, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext)
-