Record Class JmsAcknowledge
java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.operation.JmsAcknowledge
Operation that allows the user to perform an ACK over a
Message produced by the current JmsSession- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionJmsAcknowledge(JmsSessionManager sessionManager) Creates an instance of aJmsAcknowledgerecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidack(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void, Void> completionCallback) Allows the user to perform an ACK when theAckMode.MANUALmode is elected while consuming theMessage.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrecoverSession(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void, Void> completionCallback) Allows the user to perform a session recover when theAckMode.MANUALmode is elected while consuming theMessage.Returns the value of thesessionManagerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JmsAcknowledge
Creates an instance of aJmsAcknowledgerecord class.- Parameters:
sessionManager- the value for thesessionManagerrecord component
-
-
Method Details
-
ack
@Throws(JmsAckErrorTypeProvider.class) public void ack(@Summary("The AckId of the Message to ACK") String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void, Void> completionCallback) Allows the user to perform an ACK when theAckMode.MANUALmode is elected while consuming theMessage. As per JMS Spec, performing an ACK over a singleMessageautomatically works as an ACK for all theMessages produced in the sameJmsSession.- Parameters:
ackId- The AckId of the Message to ACK- Throws:
JmsAckException- if theJmsSessionorJmsConnectionwere closed, or if the ID doesn't belong to a session of the current connection
-
recoverSession
@Throws(JmsSessionRecoverErrorTypeProvider.class) public void recoverSession(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void, Void> completionCallback) Allows the user to perform a session recover when theAckMode.MANUALmode is elected while consuming theMessage. As per JMS Spec, performing a session recover automatically will redeliver all the consumed messages that had not being acknowledged before this recover.- Parameters:
ackId- The AckId of the Message Session to recover
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
sessionManager
Returns the value of thesessionManagerrecord component.- Returns:
- the value of the
sessionManagerrecord component
-