@@ -150,75 +150,40 @@ class ExchangeToExchangeBindingSpecification:
150150 binding_key : Optional [str ] = None
151151
152152
153+ @dataclass
153154class MessageProperties :
154- def __init__ (
155- self ,
156- message_id : Optional [Any ] = None ,
157- user_id : Optional [bytes ] = None ,
158- to : Optional [str ] = None ,
159- subject : Optional [str ] = None ,
160- reply_to : Optional [str ] = None ,
161- correlation_id : Optional [Any ] = None ,
162- content_type : Optional [str ] = None ,
163- content_encoding : Optional [str ] = None ,
164- absolute_expiry_time : Optional [datetime ] = None ,
165- creation_time : Optional [datetime ] = None ,
166- group_id : Optional [str ] = None ,
167- group_sequence : Optional [int ] = None ,
168- reply_to_group_id : Optional [str ] = None ,
169- ):
170- # Message-id, if set, uniquely identifies a message within the message system.
171- # The message producer is usually responsible for setting the message-id in
172- # such a way that it is assured to be globally unique. A broker MAY discard a
173- # message as a duplicate if the value of the message-id matches that of a
174- # previously received message sent to the same node.
175- #
176- # The value is restricted to the following types:
177- # - int (for uint64), UUID, bytes, or str
178- self .message_id : Optional [Any ] = message_id
179-
180- # The identity of the user responsible for producing the message.
181- # The client sets this value, and it MAY be authenticated by intermediaries.
182- self .user_id : Optional [bytes ] = user_id
183-
184- # The to field identifies the node that is the intended destination of the message.
185- # On any given transfer this might not be the node at the receiving end of the link.
186- self .to : Optional [str ] = to
187-
188- # A common field for summary information about the message content and purpose.
189- self .subject : Optional [str ] = subject
190-
191- # The address of the node to send replies to.
192- self .reply_to : Optional [str ] = reply_to
193-
194- # This is a client-specific id that can be used to mark or identify messages
195- # between clients.
196- #
197- # The value is restricted to the following types:
198- # - int (for uint64), UUID, bytes, or str
199- self .correlation_id : Optional [Any ] = correlation_id
200-
201- # The RFC-2046 [RFC2046] MIME type for the message's application-data section (body).
202- self .content_type : Optional [str ] = content_type
203-
204- # The content-encoding property is used as a modifier to the content-type.
205- self .content_encoding : Optional [str ] = content_encoding
206-
207- # An absolute time when this message is considered to be expired.
208- self .absolute_expiry_time : Optional [datetime ] = absolute_expiry_time
209-
210- # An absolute time when this message was created.
211- self .creation_time : Optional [datetime ] = creation_time
212-
213- # Identifies the group the message belongs to.
214- self .group_id : Optional [str ] = group_id
215-
216- # The relative position of this message within its group.
217- self .group_sequence : Optional [int ] = group_sequence
218-
219- # This is a client-specific id that is used so that client can send replies to this
220- # message to a specific group.
221- self .reply_to_group_id : Optional [str ] = reply_to_group_id
155+ """
156+ Properties for an AMQP message.
157+
158+ Attributes:
159+ message_id: Uniquely identifies a message within the system (int, UUID, bytes, or str).
160+ user_id: Identity of the user responsible for producing the message.
161+ to: Intended destination node of the message.
162+ subject: Summary information about the message content and purpose.
163+ reply_to: Address of the node to send replies to.
164+ correlation_id: Client-specific id for marking or identifying messages (int, UUID, bytes, or str).
165+ content_type: RFC-2046 MIME type for the message's body.
166+ content_encoding: Modifier to the content-type.
167+ absolute_expiry_time: Absolute time when the message expires.
168+ creation_time: Absolute time when the message was created.
169+ group_id: Group the message belongs to.
170+ group_sequence: Relative position of this message within its group.
171+ reply_to_group_id: Id for sending replies to a specific group.
172+ """
173+
174+ message_id : Optional [Any ] = None
175+ user_id : Optional [bytes ] = None
176+ to : Optional [str ] = None
177+ subject : Optional [str ] = None
178+ reply_to : Optional [str ] = None
179+ correlation_id : Optional [Any ] = None
180+ content_type : Optional [str ] = None
181+ content_encoding : Optional [str ] = None
182+ absolute_expiry_time : Optional [datetime ] = None
183+ creation_time : Optional [datetime ] = None
184+ group_id : Optional [str ] = None
185+ group_sequence : Optional [int ] = None
186+ reply_to_group_id : Optional [str ] = None
222187
223188
224189"""
0 commit comments