Record Class MessageBatch
java.lang.Object
java.lang.Record
org.springframework.amqp.rabbit.batch.MessageBatch
- Record Components:
exchange- the exchange for batch of messagesroutingKey- the routing key for batchmessage- the message with a batch
-
Constructor Summary
ConstructorsConstructorDescriptionMessageBatch(@Nullable String exchange, @Nullable String routingKey, Message message) Creates an instance of aMessageBatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable Stringexchange()Returns the value of theexchangerecord component.@Nullable StringDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.in favor ormessage()()}.@Nullable StringDeprecated, for removal: This API element is subject to removal in a future version.in favor orroutingKey().final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.@Nullable StringReturns the value of theroutingKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageBatch
Creates an instance of aMessageBatchrecord class.- Parameters:
exchange- the value for theexchangerecord componentroutingKey- the value for theroutingKeyrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
getExchange
Deprecated, for removal: This API element is subject to removal in a future version.in favor orexchange().- Returns:
- the exchange
-
getRoutingKey
Deprecated, for removal: This API element is subject to removal in a future version.in favor orroutingKey().- Returns:
- the routingKey
-
getMessage
Deprecated, for removal: This API element is subject to removal in a future version.in favor ormessage()()}.- Returns:
- the message
-
toString
-
hashCode
-
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). -
exchange
-
routingKey
Returns the value of theroutingKeyrecord component.- Returns:
- the value of the
routingKeyrecord component
-
message
-
exchange().